in reply to Re: negative look behind (again)in thread negative look behind (again)
>perl -wMstrict -le "for ('TAG1 text one TAG2 etc', 'TAGS text ess TAG2 etc', 'TAG1 text two TAG2 etc', ) { print qq{'$_'} if m{ \A .... (?<! TAGS) .* TAG \d }xms; } " 'TAG1 text one TAG2 etc' 'TAG1 text two TAG2 etc' [download]