This question here helped me how to do an exception: Regex with exception of particular words
Basically, rx = /^(?!apple$|orange$|banana$)/
would match everything but apple, orange and banana. But now I need to know how to do an exception for an exception.
rx = /^(?!.*$)/
I believe this would ignore everything, but what should I add to make it match nothing BUT some pre-defined words, like banana and apple?