regex - Notepad++ regular expression: line does not contain certain pattern -
i have following list of objects:
type="user" n="ag12345" status="active" type="user" n="he98745" status="active" type="user" n="user1" status="active" type="user" n="84566" status="active" type="user" n="iu78965" status="active"
i need find lines tag "n" not match pattern @@#####. in other words valid user has created 2 consecutive alphabetic characters , 5 numbers. regular expression looking should show me lines:
type="user" n="user1" status="active" type="user" n="84566" status="active"
i've tried many many things can't seem understand how this.
one of attempts was: find what:
type=user" n="(?![\l]{2}[\d]{5})" status="active"
and also:
type=user" n="(?![\l]{2})(?![\d]{5})" status="active"
but doesn't work :(
you're there. use [a-z]
instead of [\l]
, \l
won't match lowercase letters. if want deal both upper , lowercase use [a-za-z]
.
type="user" n="(?![a-z]{2}\d{5}")[^"]*" status="active"
[^"]*
, negated character class matches character not of "
, 0 or more times.
Comments
Post a Comment