$output =~ s/\x7E(?!$)/\x7D\x5E/g;
See perlre where it talks about zero-width lookaheads
In reply to Re: Regular expression substitution question
by duff
in thread Regular expression substitution question
by rduz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |