From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search for string value Without converting to array

Solved!
Go to solution

How do I go through a string to search for a value (Format: Variable = value\tVariable2 = value2), Without converting to array.

0 Kudos
Message 1 of 10
(2,507 Views)

Hi Rafael,

 

use SearchString function to look for your "variable", then parse the value after the "="...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(2,506 Views)

I need to limit the search to \ t (tab), how do I?

0 Kudos
Message 3 of 10
(2,494 Views)
Solution
Accepted by rafael.assis16

 

You could also use Match Regular Expression

 

fp.PNG

 

bd.png

Message 4 of 10
(2,468 Views)

Hi Rafael,

 

I need to limit the search to \ t (tab),

Why? (According to your other thread you should search the whole string…)

 

To answer your question:

1. Search for tab and keep the substring before the tab

2. Search your "variable" in the substring and get the value after the following "=".

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 10
(2,467 Views)

Excellent, could you give me a website to better understand Match Regular Expression?

0 Kudos
Message 6 of 10
(2,434 Views)

I need two types of search, one going through the arrays and another the string, so I'll have two options if necessary.

0 Kudos
Message 7 of 10
(2,433 Views)

@rafael.assis16 wrote:

Excellent, could you give me a website to better understand Match Regular Expression?


Just use the Help built into LabVIEW.  You can access the proper page via the Context Help or right-click on a Match Regular Expression and choose "Help".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(2,424 Views)

@rafael.assis16 wrote:

Excellent, could you give me a website to better understand Match Regular Expression?


Try https://regexr.com/

Message 9 of 10
(2,414 Views)

Tks.

0 Kudos
Message 10 of 10
(2,412 Views)