- or download this
push(@list, "($1) $2-$3") while /\(?(\d{3})?\)?\s*[-.]*\s*(\d{3})\
+s*[-.]*\s*(\d{4})/g;
- or download this
() 209-4044
(440) 248-2700
...
(313) 884-6400
(313) 884-0600
(313) 590-9253
- or download this
[me@host]$ perl -ne 'push(@list, "($1) $2-$3") while /\(?(\d{3})?\)?[-
+.\s]*(\d{3})[-.\s]*(\d{4})/g; END{print join("\n",@list)."\n";}' data
+.txt
() 209-4044
...
(313) 884-0600
(313) 590-9253
[me@host]$
- or download this
------------
:Wq
Not an editor command: Wq