in reply to Replacing string with []

Also have a look at the quotemeta function.