|
regex stumper
Alright, I got a tough cookie for all'ya.
eg.
1. <kewl>@ 342pleaseHELP #
%</kewl>
2. <kewl>@ 342please #
%</kewl>
I need to make a regex pattern that will match only number 2. And yes those are supposed to be on 2 different lines (new lines).
I tried in VIM the following:
/<kewl>\(.\|\n\)*<\/kewl>
That ends up finding both 1. and 2.
So i tried:
/<kewl>\([^a-z]\|.\|\n\)*<\/kewl>
and
/<kewl>\(.\|\n\([^a-z]\)\)*<\/kewl>
That didn't work.
Is there a logical "BUT" or "AND" operator in regular expressions. I mean regex is based on set theory! Where's the AND operator? How about quantifier scoping? I need an "AND NOT" operator!! Very frustrated.
|