in reply to negative look behind (again)
Why? Because negative lookbehind is satisfied at any position except immediately after the given subpattern. Thus your (.*?) is free to match at the very beginning. Using a lookahead may accomplish what you had in mind (if $1 must contain the start tag).
if (/^(?!TAGS)(.*?)TAG2/x ) { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: negative look behind (again)
by AnomalousMonk (Archbishop) on Jan 20, 2014 at 18:52 UTC |