in reply to match substitution
which produced the following result:use utf8; 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})/\1\_\2/g; print "$str\n"
I am getting some strange characters if I use \x{2014}! I am not sure about the hyphen to dash substitution. Update: I just saw ikegami's reply!725_275 is an entry - and will be at 423_569 -but- not at 012_457.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: match substitution
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 |