my $remove = quotemeta "{ (This Word) }"; print $remove; # See what happened.
You can also shorten it to
my $text = 'to { (This Word) }'; my $remove = '{ (This Word) }'; $text =~ s/\R//g; $text =~ s/\Q$remove//; # <-- the \Q means quotemeta
In reply to Re^3: Question about parentheses in regex
by choroba
in thread Question about parentheses in regex
by Von_Halen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |