That's easily done with substitution:
$string =~ s/\\'\\'//;
Or more elegantly...
$string =~ s/\Q\'\'\E//;
...where \Q and \E eliminate the need to escape the backslashes. Actually, for such a small substring, \Q and \E may just look like too much line noise.
This will remove the first occurrence. If there are multiple, you have to modify with /g.
Dave
In reply to Re: Remove substring
by davido
in thread Remove substring
by mosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |