|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: RegEx - Positive Look-aheadby 7stud (Deacon) |
| on Feb 05, 2013 at 18:42 UTC ( #1017247=note: print w/ replies, xml ) | Need Help?? |
|
This regex:
is equivalent to:
So this regex: [^{{}}]Is equivalent to: [^{}]I am expecting it to match the entire block up to the first mismatched '}}' Huh? First, you said this: I am using the following to extract data with a {{Infobox ... }} block, with the catch being that there might be {{ ... }} blocks within it. Then you said this: The problem is that this does not match if I have {{ something {{{ text }}} }} in my content ... Here is a regex that will 'match' both:
To ask a regex question that is specific enough to get a relevant answer, you need to post:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||