If you're on perl 5.10 and greater, you could put it into an array and then check using perl smart operator.A good example of how to use this is
here. It's not using a regexp but it might be helpful if you are trying to see if "x" value is in an array of values.