LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Whole word string replacement in LV7.1

Is there anyway to do whole word string replacement in 7.1?

 

For example, if I have the string "x21+sin(x2)" and I want to replace "x2" with "b2" without accidently changing "x21" into "b21". I saw that 7.1 does not support the word boundary "\b" in regex.

0 Kudos
Message 1 of 2
(2,194 Views)
The easy solution is to search for "(x2)" and replace with "(b2)" but if you're not sure that x2 will always be in parenthesis, then another solution would be to get the next character after "x2" is found, and if it is not a number (0-9) then you have found x2, if it is a number then you have found x21, or x22, etc.
0 Kudos
Message 2 of 2
(2,182 Views)