in reply to Regex from string

What you have is fine, except for an error in $match. You forgot to escape the right paren. You should use single quotes so that complicated quoting issues don't arise, also.

Added: The qr operator, as suggested by Samy_rio++, has a lot to recommend it for this.

After Compline,
Zaxo