Let us say that you have a input file containing customer information, in CSV (Comma Separated Value) format:
5001,"Jones","Fred","514-555-1234"
5002,"Smith","Mary","416-555-4321"
5003,"Black","Peter","303-555-0123"
5004,"Jones","Wilma","202-555-9876" |
Now let us say that you want to:
- Extract the last name, first name and phone number
- Output the name as "first name [space] last name"
- Output the phone number
- Skip the 303 and 202 area codes
Even though this is a simple requirement, writing it in a traditional programming language would use up about half an hour of your valuable time. Using the Parse-O-Matic
Free Edition, though, you could handle the task very quickly, with a script like this one:
LastName = Parse $Data '1*"' '@*"'
FirstName = Parse $Data '3*"' '@*"'
PhoneNum = Parse $Data '5*"' '@*"'
AreaCode = PhoneNum[1 3]
If '/303/202' ^ AreaCode Done
OutEnd FirstName ' ' LastName ' ' PhoneNum |
That's all there is to it. There are no loops, no variable declarations, no need to declare, open and close files. Plus, you can test the script instantly and view the results immediately:
Fred Jones 514-555-1234
Mary Smith 416-555-4321 |
Once you have written the script, you simply start up the Parse-O-Matic
Free Edition, enter the names of the script, input and output files, then click the Start button. The results are shown on the built-in browser.
|
|
|
|
|
|
|
 |
|
|
 |
Are you a developer or programmer? Write
your own parsing scripts with Parse-O-Matic Free,
Basic, Business or Enterprise. |
|
 |
|
|
|
|
|
|
|
|