DEV Community

Discussion on: What are the least intuitive fundamentals and best practices in software development?

Collapse
 
cjbrooks12 profile image
Casey Brooks

The funny thing is, I've found it's sometimes far easier and cleaner to just write a full parser than a really complicated regex. A pretty decent recursive descent parser only takes a few dozen lines of code, and you get full recursive structures and an AST, which are a whole lot easier to work with than complex capturing groups.

Regex is a very useful tool, but don't let that be the only tool in your arsenal for String processing.