4 ms·
Regexes are actually a great example of a tool that makes it easy to write code that is difficult for you to fully understand later.
by simonw 12y ago
Regexes are actually a great example of a tool that makes it easy to write code that is difficult for you to fully understand later.
- kbenson 12y agoRegexes are an easy way to include a second language into your project without realizing it. If you don't put the same discipline on that language as you do the one you are using it in, you are raising your likelihood of problems. Well commented[1] and modularized (for large enough) regular expressions can be just as readable, as long as you accept you are no longer using a single language. 1: http://perldoc.perl.org/perlretut.html#Embedding-comments-and-modifiers-in-a-regular-expression http://perldoc.perl.org/perlretut.html#Embedding-comments-an...