NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SearchAndReplace Replace special characters

Solved!
Go to solution

I'm using TestStand 2016 and want remove all new lines in a string.

 

I tried this:

Locals.MyString= SearchAndReplace(Locals.MyString, "[\s]", "")

Locals.MyString= SearchAndReplace(Locals.MyString, "\s", "")

Locals.MyString= SearchAndReplace(Locals.MyString, "\n", "")

 

But I can't remove the new line

 

"aaa bbb

 ccc"

 

to 

 

"aaa bbb ccc"

0 Kudos
Message 1 of 2
(1,873 Views)
Solution
Accepted by topic author Struct

Try this SearchAndReplace(Locals.String,"\r\n", "")

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 2 of 2
(1,841 Views)