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 part of string, then replace with new string

Solved!
Go to solution

In the attached VI, I am attempting to search if a part of the word "Primary" is in a string. If any part of that word is found, then the partial word is replaced the with the full word "Primary".  For example, some enteries will contain the word "Prim", or "Primar".  These words must be replaced with "Primary".

 

Thanks.

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

This should work, IF AND ONLY IF, Prim, Primar, Primary, is at the end of the string like in the example you posted.

 

mcduff

snip.png

 

 

 

 

Message 2 of 3
(2,408 Views)
Solution
Accepted by topic author hiNI

I did not consider the case without Prim, Primar, etc.

 

Then modify as such

snip.png

 

 

 

mcduff

Message 3 of 3
(2,399 Views)