in reply to Variable in regex...

you have to use the quotemeta for your search string to include the special charecter in your search

quotemeta($rhs); or \q$rhs[1]\E

Regards,

Senthil Kumar.k