LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search strings

Solved!
Go to solution

Hi,

 

I have a string that change always but I want to take one particulary string. I used Scan from String Function

 

My first string : 0A47487980 0A88762AF7 0AFFFF017.

Same string but another time later : 0A47487980 0A00010178 0A88762AF7 

 

I want to extract the frame that begin with 0AF or 0A0 , in the the first string it's FFFF017, in the second it's 00010178. The string changes always but the first three never change and there are always in 8 bit after 0A.

 

I put in Scan from String Function, the format is 0A0 %8s. But how do you specify that I want either 0A0 OR 0AF ? I tried the format 0A0 %8 | 0AF %8 but that's not working ...

 

Can you help me ? 

 

Best regards.

0 Kudos
Message 1 of 4
(1,860 Views)

Hi Manu,

 

you could use two separate search string operations.

Or you could use an array of search strings and do your operations in a loop…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 2 of 4
(1,843 Views)
Solution
Accepted by Manu61

Try match regular expression

 

RegEx.png

0 Kudos
Message 3 of 4
(1,832 Views)

Thank you OEM_Dev and G

0 Kudos
Message 4 of 4
(1,812 Views)