Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- match any character but
- Jon Slaughter
May 5, 2007, 9:29 am
rate this thread
character but a fixed list?
I need to match a string that does not contain any /'s but I don't want to
have to use a character search string. (I don't see any need to have to
matches any single charactr
and (.*) matches any string
what I want to do is use something like % that means
which means match any character but /.
Of course it would need to be valid and I know I can't make up semantics for
the reg ex. My point is is that, is that I don't want to have to use
[a-z0-9\-%&^$#@!etc...] to mean . but not /.
Surely there is a way to exclude a few characters from . without having to
increase the complexity of the expression 1000 fold?
If you don't get that, then a simple example would be that I have an
arbitrary string and I want to match only if that string does not contain an
a. Sure I can so something like
but surely reg exp has an easier way??? (again, this is specifically for mod