4 ms·
I hadn't seen recursive regex before (almost a tautology). The operator in the article, "(R?)", isn't in Perl (v5.8.8).
by 10ren 18y ago
I hadn't seen recursive regex before (almost a tautology). The operator in the article, "(R?)", isn't in Perl (v5.8.8).
- DEinspanjer 18y agoYeah. PHP syntax. From what I understand, they stuffed it in there mostly to allow easier processing of nested HTML tags and such.
- lucumo 18y agoI did some experimenting with recursive regexes after reading this article. I hadn't heard of it before and it sounded like an interesting concept. However, captures in the recursion can't be retrieved after it gets returned. This may not be surprising, but it does reduce the power of recursion somewhat.
- tjpick 18y agocoz you can't expect anyone using PHP to, you know, write a proper parser...