Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$phone =~ s/\(//g; $phone =~ s/\)/-/g;
... my $phone = "(xxx)1234-0000"; $phone =~ s/\(//g; $phone =~ s/\)/-/g; print $phone; # Result: xxx-1234-0000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Combining two actions in RegExp
by jwkrahn (Abbot) on Jan 23, 2018 at 19:43 UTC | |
by Anonymous Monk on Jan 23, 2018 at 20:01 UTC | |
by Cristoforo (Curate) on Jan 23, 2018 at 20:31 UTC | |
by Anonymous Monk on Jan 23, 2018 at 21:00 UTC | |
by AnomalousMonk (Archbishop) on Jan 23, 2018 at 21:18 UTC | |
|