Nope. That would fail to match on a string like "<P>This is fine.</P><P><b>next</b></P>".m#<P>(?!.+<b>)(.+)</P>#i
The next ought to work. It does a lookahead for the bad string "<b>" on every character it reconsiders matching, on the internal string.
m#<P>(?:(?!<b>).)+?</P>#i
In reply to Re^2: Regular expression matching
by bart
in thread Regular expression matching
by murugu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |