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

That's one of my pet peeves too. Another pet peeve is that I only touch regex once every few months. When you have a regex set to parse a domain of data you move on to other things. After a while you forget the regex syntax and when you have to parse another set of text or have to debug the older regex, I end up having to relearn a bit of it. But I guess it comes with the territory.


Python has a nice trick for commenting regexs with re.VERBOSE. I use it for all non-trivial regexs.

https://docs.python.org/2/library/re.html#re.VERBOSE




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

Search: