in reply to Re: More Regular Expressions (text data handling)
in thread More Regular Expressions (text data handling)
Yes, sorry, I should have expanded on the data. Especially the noise either side of the data. Hence the indexing step. Below is a data example closer to a true example.
The first guaranteed unique identifer is the line begining with Number (ie /^Number:/).__DATA__ NOISE noise Graq 121212 rubbish: values Graq Agnostic Number: 634321 age: 27 hair colour: black height: 73 weight: 123 legs: 2 arms: 2 balls: 1 aminals: 3 leftandright rugby cute "more noise here - and don't forget the blank lines..." __END_DATA__
Lines before the colon (:) seperated set of values are key-less (hard coded keys must be used), values after are sub-values of the preceding : values.
So, if you like, {arms}->{2}->{leftandright}, {balls}->{1}->{rugby} ..
Is it becoming any clearer?? :-(
<a href="http://www.graq.co.uk">Graq</a>
|
|---|