in reply to Re: Regular expression matching
in thread Regular expression matching
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression matching
by Abigail-II (Bishop) on Mar 17, 2004 at 13:35 UTC | |
|
Re: Re^2: Regular expression matching
by Hena (Friar) on Mar 17, 2004 at 10:57 UTC |