LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

searching for dot in a string

I came by this odd behaviour making a VI that checks a file name for illegal characters. Is there an explanation for this? See attached file.
0 Kudos
Message 1 of 3
(4,881 Views)
This is not the first time I find the answer not long after I post a question!
I guess the dot is also a special character that can be searched if put between square brackets: [.]

But it doesn't quite solve the problem, as the attached file illustrates. The same thing happens with the "^" !!
The example shows that searching with [^] yields position 1 and with ^ position 0. What is going on??

Aart-Jan

PS. Files are LV 7.0
0 Kudos
Message 2 of 3
(4,881 Views)
to search for special characters, put a "\" in front of them when forming the pattern to match:

e.g.
"\." finds a single period.
"\^" finds the "^" character, etc.

without escaping them, they have a special meaning, e.g. "." means any character.

Right-click on match pattern..Select "help". On the help page, click on "special charaters" for more details (green link under description for the "match pattern" terminal.
Message 3 of 3
(4,881 Views)