I know that the following regex will match \"red\", \"green\", or \"blue\".
red|green|blue
Is there a straightforward way of making it mat
Depends on the language, but there are generally negative-assertions you can put in like so:
(?!red|green|blue)
(Thanks for the syntax fix, the above is valid Java and Perl, YMMV)