Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: