LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parse a string that uses nested string delimiters

I’m looking for a way to parse a string that uses double quotes as the delimiter that contains a nested string with double quotes.  I want to keep the double quotes in the nested string.  Is there a function in Labview that I can use to easily do this?  Does Labview have a command line parser / interpreter?

 

The string example is: While match "Send Test "Sleep 5" ">""

 

The result string would be:  Send Test "Sleep 5" ">"

 

0 Kudos
Message 1 of 4
(2,946 Views)
Hi jefska:

Here you have a first try.

Hope it helps,
Aitortxo.
0 Kudos
Message 2 of 4
(2,941 Views)
Here is another solution which is slightly faster.  Speed won't be an issue unless you are running millions at a time, as in my test the difference was only 1-2 ms in 10000 iterations.  In this image the Match Pattern function retrieves the desired string, including the outside quotes, so the String Length and String Subset functions are used to remove the first and last characters of the result.



Message Edited by tuba on 04-11-2006 10:35 PM

Message 3 of 4
(2,920 Views)

Thanks for the examples and the quick turn around on these solutions.

Jeff

 

0 Kudos
Message 4 of 4
(2,898 Views)