![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Recursive Regular Expression Helpby nobull (Friar) |
on Apr 12, 2008 at 14:03 UTC ( #679991=note: print w/replies, xml ) | Need Help?? |
So you had some working code, you made a change, and problems ensued?
Perhaps if you showed us the change you made we could see what you did wrong. At a random shout in the dark you inserted stuff inside the recursive part of the pattern. PCRE now supports the reusable sub-expression syntax. The problem of matched parentheses is the most commonly quoted example of using this construct.
This, of course, is Perl code - adapting it to PHP is left as a exercise for the reader. I should add, this only checks for nested {} it doesn't know to ignore {} within quotes - that too is possible by hybridising the above with the tricks for parsing CSV.
In Section
Seekers of Perl Wisdom
|
|