in reply to Re^5: Combining two actions in RegExp
in thread Combining two actions in RegExp
I need to go back and read on these lines of code, very clever, thank you very much!!my %xlate = ( '(' => '', ') ' => '-' ); $phone =~ s{ ([()][ ]?) }{$xlate{$1}}xmsg; # OR $phone =~ s{ \( \s* (\d{3}) \s* \) \s* }{$1-}xmsg;
|
|---|