in reply to CSV regex with hash/array program plan
Your third question is the fun part. I don't find that writing the regexes is that difficult. The problem is more 'are you sure you're getting everything correctly?'.
I generally attack it like this: write regexes for the first 5 or ten lines of data. Then make a program to match and delete all the requirements that it can. Then look at the next few lines of what's left, and add new regexes and/or altering existing ones. After a few iterations, you'll have regexes that can handle most of the data. You may have a few stragglers (misspellings, etc.) that may require a bit of playing with. You might, for example, first repair misspellings before matching requirements.
Have fun with it!
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CSV regex with hash/array program plan
by campus1plb (Initiate) on Nov 23, 2014 at 18:55 UTC | |
by AnomalousMonk (Archbishop) on Nov 23, 2014 at 21:57 UTC | |
by Anonymous Monk on Nov 24, 2014 at 01:16 UTC |