There are domain specific solutions (\Q and \E for regex escaping, Encode for character encoding, HTML::Entities and so on), but a regex is the general answer to the general problem.
In reply to Re: string escaping / de-escaping functions
by GrandFather
in thread string escaping / de-escaping functions
by fearless_fool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |