
Code Smell 41 - Regular Expression Abusers
4 January, 2023
8
8
0
Contributors
Problems
•
Readability
•
Maintainability
•
Testability
•
Intention Revealing
Solutions
1.
Use regular expression just for string validation.
2.
If you need to manipulate objects, don't make them strings.
Sample Code
Wrong
Right
Detection
•
Primitive Obsession
•
Abusers
Conclusion
Relations
More Info
Credits
A Perl program is correct if it gets the job done before your boss fires you.