LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search string for backslash

Solved!
Go to solution

I am trying to match a pattern in a path. The path is for example, "\ \Amss02\modemdata\New\WO 4276\11243_Mar_01_2007_13 16.txt" and I want to search for the number 11243 in the path. Right now I am converting it to a string and matching a pattern of 11243 and that works. But if I want to search for 112 or 124 then it returns this path as valid, which it is not. I tried to match the pattern \112_ (adding the backslash and underscore) but the backslash is monkeying with the search I think.

 

Any ideas?

 

Tay

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

Use a "\\" to match a single backslash. For example use pattern "\\112_" to search for "\112_"

 

Check the online help for details.

 

Typically, it might be easier to not convert to a string and use "strip path" to get the filename and then operate on it.

Message Edited by altenbach on 09-24-2008 12:56 PM
Message 2 of 3
(2,876 Views)
Solution
Accepted by topic author slipstick

Thanks! That fixed that issue.

 

Tay

0 Kudos
Message 3 of 3
(2,833 Views)