3 ms·
I’m sad that the author seemed to know neither the original proper wording, source, nor context of the jwz quote about regular expressions. Maybe JWZ’s quote ha
by egwynn 11y ago
I’m sad that the author seemed to know neither the original proper wording, source, nor context of the jwz quote about regular expressions. Maybe JWZ’s quote has just spread too far or too wide. Either way, I think Jeff Atwood hit this nail on its head: http://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/ http://blog.codinghorror.com/regular-expressions-now-you-hav... .
- Jtsummers 11y agoIt's similar to the misunderstanding about Knuth's optimization quote. Regex isn't bad, regex is bad when it's used thoughtlessly (like most tools, but worse than many because it's so information-dense that errors and misapplication may be non-obvious). Use regex to recognize strings. Don't use regex to recognize grammars. (A particularly common abuse of regex.) Break your regular expressions up either visually (if your language allows it) or into multiple expressions so that they're clearer and more easily understood and changed.
- teh_klev 11y agoI think that was a stylistic choice for the purpose of injecting humour rather than not knowing.