8 ms·
I agree with the point about comments being useful for a really long complicated regex, but any really long complicated regex is a coding problem to begin with.
by thenonsequitur 14y ago
I agree with the point about comments being useful for a really long complicated regex, but any really long complicated regex is a coding problem to begin with. Really, instead of comments (or in addition to comments), the regex should be broken up into logical pieces separated by white-space, just like regular code is. Jeff Atwood explains it well in this classic post: http://www.codinghorror.com/blog/2008/06/regular-expressions-now-you-have-two-problems.html http://www.codinghorror.com/blog/2008/06/regular-expressions...