rduz has asked for the wisdom of the Perl Monks concerning the following question:
because it also escapes the last character in the string. Can this be done with a regex, or should I just give in and write a loop?$output =~ s/\x7E/\x7D\x5E/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression substitution question
by duff (Parson) on Mar 31, 2004 at 18:19 UTC | |
by Roy Johnson (Monsignor) on Mar 31, 2004 at 19:01 UTC | |
by rduz (Initiate) on Apr 01, 2004 at 03:08 UTC | |
|
Re: Regular expression substitution question
by Enlil (Parson) on Mar 31, 2004 at 18:20 UTC | |
|
Re: Regular expression substitution question
by davido (Cardinal) on Mar 31, 2004 at 18:20 UTC |