in reply to Regex with variables?
Your solution will work if you replace the = by =~.
Hope this helps, -gjb-