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

I got a lot of mileage out of the x modifier, too, until I bumped into the Composed Regex pattern. https://www.martinfowler.com/bliki/ComposedRegex.html


Nice explanation (as expected from Fowler). Yep, mix that with a bit of interpolation and an iterator, maybe wrapped in an object and you have something readable and flexible. Not sure why people want to make regex any harder than they need to be?




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

Search: