in reply to Re^5: Negating a regexp
in thread Negating a regexp
I didn't say it never works. I know it works for "ted", but it doesn't work for "bil". "bil" doesn't match /bob|fred|bill/ so it should be changed to "HIT".
[^chars] means "something that isn't 'c', 'h', 'a', 'r' or 's'". What you posted doesn't necessarily mean "something that isn't 'bob', 'fred' or 'bill'". (It depends on what bob, fred, bill and more really are.)
Update: Added "necessarily".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Negating a regexp
by GrandFather (Saint) on Jan 31, 2006 at 23:10 UTC |