3 ms·
Respectfully, no. If you're trying to write a full blown language parser then regexps are the wrong tool, but a 50 line function doing the job of a regexp has a
by zamnos 4y ago
Respectfully, no. If you're trying to write a full blown language parser then regexps are the wrong tool, but a 50 line function doing the job of a regexp has a really funky code smell. Comment your regexps*, and use a parser when your usecase outgrows regexps, but a blanket ban on regexps smells of "I'm not smart enough to understand them".
* https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch02s18.html https://www.oreilly.com/library/view/regular-expressions-coo...