Think about Loose Coupling | |
PerlMonks |
Re: Re: Lookahead assertion confusionby ihb (Deacon) |
on Jan 10, 2003 at 22:41 UTC ( [id://225981]=note: print w/replies, xml ) | Need Help?? |
Unfortunately that fails for '<p> ONE <p> TWO features: <ul> THREE <p>'.
You can fix this by making the engine go one char at a time: /(<p> )((?:(?!<p>).)*)(features: <ul>)/i Hope I've helped, ihb Update: Just for fun: /(<p> )(?>(.*?)((<p>)|features: <ul>))(?(4)(?!))/i
In Section
Seekers of Perl Wisdom
|
|