here is the code that I used, to test based on the the information given, I used a perl one liner to validate it works without a hitch
perl -pi.back -e 's#\D*(\d{3})\D*(\d{3})\D*(\d{4})#(${1}) ${2}-${3}#s;' clients.txtNow of course, I realized the flaw in my thinking, and several components of the script are completely written on Linux systems, the flaw of course is that when testing the perl script on a windows system without say cgywin and only strawberry or absolute perl calls for awk and sed will not work. Luckly at this point there is only a single awk command left. All it does is place double quotes around each line in the output.txt file so that the perl script can then modify the other lines with the necessary formating. If I can figure out how to get double quotes at the begining and end of each line, then when its formated it can be converted into a CSV file and imported into a DB.
In reply to Re^2: Running complex sed from perl
by sunglant
in thread Running complex sed from perl
by sunglant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |