regex - Matching lines with negative lookbehind for character string -
I am trying to match those lines that do not start with "jays_", which is a negative look -Behind uses. Why do not I have work?
(? Lt ;! (Zzz _)) \ w +
Look forward to something that you
^ (?! Zzz _) \ w +
^regex anchor at the beginning of the string
(?! Zzz _)Negative Look Up If it does not start then check is not done byzzz _, then with the remaining pattern,< <>>
Code> (? & Lt;! (Zzz _)) \ w +
zzz_asdfFrom me Can be targeted, but the case is now starting from the first character from the right to left
zzz_asdf | (? & Lt;! Zzz_asdf) The beginning of the beginning of the back is right because the beginning of the string is not introduced by zzz_, so this remainder pattern has come with zzz_asdf. \ W zzz_asdf | \ W and by the end
If you still want to look backwards, you can write something
^ .. .. (? & Lt;! Zzz _) \ w +
Comments
Post a Comment