Thanks. I see the error of my ways. What I wanted was to capture the pieces as long as there were no intervening <p> tags in between. Stupid me was thinking the lookahead assertion checked if the expression was anywhere in between, whereas I had specified immediately following. Expanding the lookahead expression to a more compreshensive match was the key. I ended up using this regex to do the match:
($test =~ /(<p> )(?!.*<p>.*)(.+)(features\: <ul>)/i)
In reply to Re: Lookahead assertion confusion
by steves
in thread Lookahead assertion confusion
by steves
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |