Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Monks,
I have a set of strings (pulled from a DB) that I'm concatenating into one string, using the following code: Simple enough, and it does the job, except where the imported strings contain any form of parentheses, for example () or [], where the string always gets appended regardless of whether it's already there or not. I'm trying to find a way to escape the strings that are being matched against - does anyone know of a way to do this? I've tried running the string through qq, and tried using /"$string"/ to match, with no success .. Thanks in advance for your help.
In reply to Escaping parentheses in regexps by Tanalis
|
|