in reply to Re^2: Running complex sed from perl
in thread Running complex sed from perl
There is more than one way to do it. You could add double quotes via additional search and replace.
perl -pi.back -e 's#\D*(\d{3})\D*(\d{3})\D*(\d{4})#(${1}) ${2}-${3}#s; + s#^#""; s#$#"#' clients.txt
|
|---|