August 19th, 2010, 05:23 PM
Match random string except for these groupings
I'm trying to write a regex that would allow me to match a random string as long as it doesn't match a set of words, e.g.
But not match a specific set of strings that begin with
so further permutations would not be matched:
I tried something like
Which sorta works, but user/mark does match ...
August 20th, 2010, 11:35 AM
If your language supports negative matches (like grep -v) then you can just write one that matches what you DON'T want, and negate it.
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.
August 20th, 2010, 11:59 AM
Thanks I'll give that a go
Originally Posted by ManiacDan