Is there an NOT operator in Regexes?
Like in that string : "(2001) (asdf) (dasd1123_asd 21.01.2011 zqge)(dzqge) name (20019)"
I want to delete all ([0-9a-zA-z _.-:]*)
but not the one where it is a year: (2001)
.
So what the regex should return must be: (2001) name
.
NOTE: something like ((?![d]){4}[0-9a-zA-z _.-:]*)
does not work for me (the (20019)
somehow also matches...)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…