Hacker News new | past | comments | ask | show | jobs | submit login

It's why you should always write regex (at least, anything beyond a couple of characters) using the `x / PCRE_EXTENDED` flag. It makes them ignore whitespace and anything following a #, so you can split your regex up onto multiple lines and comment it to explain what it's doing.



Here's the documented version: https://gist.github.com/dperini/729294

We should get a port to every language.




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

Search: