ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to scan quoted string

I hate asking stupid questions, but I am stuck ...

Given a string with a quoted substring - how do I extract the quoted substring?

For ex: balh blah blah blah "quoted text" blah blah blah ...

I want to pull everything out between the quotes and I know the index of the fist Quote (or possibly the space before it).

I thought I could simply use Scan String For Tokens with a Double Quote as a delimeter, but that doesn't seem to work.

Is there a special way to enter the " as a character/delimeter?

Any ideas?

- Rick




0 Kudos
Message 1 of 5
(3,651 Views)
Is this supposed to happen more than once? If not, it would be easier to just use the Match Pattern function:



Otherwise you can use the Scan String From Tokens function this way:




Message Edited by smercurio_fc on 06-23-2008 01:35 PM
Download All
0 Kudos
Message 2 of 5
(3,644 Views)
Thanks!

I thought that is what I did, I'll have to compare ...

- Rick
0 Kudos
Message 3 of 5
(3,632 Views)
Ok, I entered your example and am still getting the same issue.

I get a "-1" for the token index after the first pass through the Scan For Tokens VI.

Can you take a look at the attached and tell me what I am doing wrong?

I'm missing something simple ..

- Rick


0 Kudos
Message 4 of 5
(3,615 Views)
Never Mind - I see the error ...
0 Kudos
Message 5 of 5
(3,612 Views)