04-02-2013 10:05 AM
Hi,
I am sure this is fundamental to some but to me it is a total mystery, can you help?
I read in a file, good got it.
I have a number of lines with the string “Type=”, found them.
Now is the problem as what is after the found string is what I need.
The following is an example
Module Location="J2" Type="0x988" Serial="0x180c2148" FPGAType="0xb1d" FPGAConf="0x1db" FPGARev="0xe"
FindPattern will give 22 the start of the first Type and I could use that index, 22 + 5 and extract the number!!!
How do I extract 0x988 and then get 0xb1d from this line?
Thanks for the help
Simon
04-02-2013 10:23 AM - edited 04-02-2013 10:41 AM
Hi Simon, FindPattern provides a starting index, you can set it to 22+5 etc. for your next search for 'Type'.
Concerning the data extraction I guess that Roberto answered it already here
Did I get you correctly?
04-03-2013 02:23 AM
Wolfgang,
Correct, now I have it.
Not only am I not a very good one to write code I also have a memory of a goldfish, thanks for point me to a file read related issue I also started.
With your, and others in the discussion forums, help I will eventually get the hang of it, I hope.
Thanks
Simon