in reply to Re: Lookahead assertion confusion
in thread Lookahead assertion confusion

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