I am using a regex pattern to find a unique name.
How can I make my negative lookahead patten (?!...) ignoring upper or lowercase:
I already tried (?i)
but it makes the whole pattern ignore the very negative lookahead!!!!
here is my pattern:
pattern = "(^(?!(david|hello|dreamer|John_Doe|socceroos)$).*)(^[\w].*)"
But it accepts the same word with different letter case! for example if I enter DaVid its still a valid entry!
and I want it to ignore case sensitivity if there is a match! And how can I invalid double-space anywhere in my string too?
any ideas my friends?