LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Scan String For Tokens" function ignores delimiters input

Good time of day.

 

I have a code that generates clusters out of JSONs. The "Scan String For Tokens" should ignore all delimiters and react only to token templates. Unfortunately this is not the case, the function still stops on space character or comma and breaks the correct execution of the code.

The other thing may be that %s in the token does not support white space characters or commas?

If the space is removed or replaced with an underscore, the problem does not occur.

What am i doing wrong?

 

LV2014

A note about file execution: If a recognized token in the middle of an array is "End", that means the token was not actually recognized.

Default values of the VI should provide an example.

________________________________________________________________________
"When I need the side of a building to view all the code..." -Mark Yedinak
"...when you need a navigation window to view the navigation window..." -Jeff Bohrer
0 Kudos
Message 1 of 2
(2,378 Views)

Yep, that's it. %s in token template does not accept white space characters. Also, token template for some reason does not support %[0-9a-zA-Z ,] either.

 

In the end i made a work-around and replaced all the strings between quotation marks with temporal "string#" and incremented numbers, and right before the implementation i swap them right back. 

________________________________________________________________________
"When I need the side of a building to view all the code..." -Mark Yedinak
"...when you need a navigation window to view the navigation window..." -Jeff Bohrer
0 Kudos
Message 2 of 2
(2,336 Views)