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

Perl 6 extends the regex system to be a full fledged recursive descent parser, which lets you do this kind of stuff. But as is pointed out in a sibling comment, a purely regular regex engine won't really do it since it's non-regular language.

Of course, some regex engines do let you do this (notably Perl 5), but it requires code of the "just because you can doesn't mean you should" variety.



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

Search: