Hi Everyone,
I have a string of text. It looks something like this.
0 000 XXX XXX 00 A|B|C|D E|F G H|I J|K|||L|M N|O|||P||Q|||R
I need to capture the A through the end of the line in a variable.
The data here is arbitrary...but the spacing is fairly well set...for example the 6th token (keyed on spaces) starts the data I want to capture.
The problem is, tokens 4 and 5 have varying lengths, so $left is out...and the data A-R may have spaces in different places...se $gettok(%text,6,32) gives me everything up to F...but I need everything after the F too...like $gettok(%text,6-,32) (but I know that's invalid syntax).
I could run a loop from 6 to $toknum(%text,32) and add it into the variable ...but that just seems kinda sloppy..
Could a $regex do it? something like %variable = $regex(%text,[A-Za-z]|*) or something?
Anyway..what are your thoughts...I know it can be done elegantly..but I'm just not sure how to do it.
Thanks for your help.
-AltReality