Your string replacement contains characters that are special to the regex engine. See perlop on \Q resp. quotemeta.
In reply to Re: Problem with regex substitution within windows paths
by Corion
in thread Problem with regex substitution within windows paths
by jmb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |