in reply to More Regular Expressions (text data handling)
Some lines have a field name and a value:
Some lines have two field/value pairs, with no separator!Number: 634321
Some lines have a value, with no field name:age: 27 hair colour: black
And toward the end you have a series of values, followed by a series of field names:Graq Agnostic
jameson bells guinness favourite detests likes
If there are in fact any real rules governing the data, you should tell us. Better yet, you should if possible change your data structure to something easier. I'll bet that you could parse this easily:
# DATA: Start name: Graq religion: Agnostic Number: 634321 age: 27 hair colour: black height: 73 weight: 123 legs: 2 arms: 2 favorite: jameson detests: bells likes: guinness # DATA: End
buckaduck
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: More Regular Expressions (text data handling)
by graq (Curate) on Dec 04, 2001 at 18:57 UTC |