in reply to Data Salad Address Problem
- Records seem to be separated by a blank line (two \n)
- Every field takes a certain number of characters on every line
- Every field can take multiple lines
- ZIP code is in the format /\d{5}-\D{4}/
You can use a multiline regexp, process each line with substr pushing elements into corresponding array(s) or appending to the strings/whatever. I'm not clear about ZIP codes - if they can be in field 4 or 5, use regex; if they are only in field 5 (and we do not see it because of HTML scrambling the text separators), then you'll be fine.
HTH
P.S. If you want, we can work on the code later...
--------------------------------
An idea is not responsible for the people who believe in it...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data Salad Address Problem
by djp (Hermit) on Jul 29, 2005 at 03:29 UTC | |
by bofh_of_oz (Hermit) on Jul 29, 2005 at 12:42 UTC |