In my opinion, it might make more sense to enforce better practices with using regular expressesions other than forgoing it all together.
- Always comment your regular expressions. You might know what it does now, but someone else might not and even you might not remember in two weeks. Moreover, descriptive comments should be used, stating exactly what the regular expression is meant to do.
- Use unit testing. Create unit tests for your regular expressions. So can have a degree of assurance as to the reliability and correctness of your regular expression statement. And if the regex is being maintained, it would ensure that any code changes does not break existing functionality.
Using regular expression has some advantages:
- Time. You don't have to write your own code to do exactly what is built in.
- Maintainability. You have to maintain only a couple of lines as opposed to 30 or 300
- Performance. The code is optimized
- Reliability. If your regex statement is correct, it should function correctly.
- Flexibility. Regex gives you a lot of power which is very useful if used properly