LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

extract twice from a string

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

0 Kudos
Message 1 of 3
(2,996 Views)

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?

0 Kudos
Message 2 of 3
(2,994 Views)

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

0 Kudos
Message 3 of 3
(2,981 Views)