| Raw Input
|
| Desired Output
| 4045551212
8862244371
8815301926
0968517332
|
| (404) 555-1212
(886) 224-4371
(881) 530-1926
(096) 851-7332
|
|
Script and Comments
Script1 [perl] [ 1] s/^(.{3})(.{3})(.{4})$/($1) $2-$3/
|
Script2 [sed] [ 1] s/^\(.\{3\}\)\(.\{3\}\)\(.\{4\}\)$/(\1) \2-\3/
| |