ShayShay has asked for the wisdom of the Perl Monks concerning the following question:
(Yes, I am aware that the result would be grammatically incorrect.) Unfortunately, this throws an error: "Unrecognized escape \d passed through"my $str = "725-275 is an entry - and will be at 423-569 -but- not at 0 +12-457."; $str =~ s/\d{3}-\d{3}/\d{3}\x{2014}\d{3}/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: match substitution
by ikegami (Patriarch) on Jan 27, 2010 at 00:37 UTC | |
|
Re: match substitution
by umasuresh (Hermit) on Jan 27, 2010 at 00:41 UTC | |
by ikegami (Patriarch) on Jan 27, 2010 at 00:42 UTC | |
by umasuresh (Hermit) on Jan 27, 2010 at 01:05 UTC | |
by ShayShay (Acolyte) on Jan 27, 2010 at 12:25 UTC |