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: 

Need some Scan from String help...

Solved!
Go to solution

This is a primitive I never really use, and I often end up going with a hacky approach of combining search from string, match pattern, and some other primitives to get the job done.  I'm feeling like this current task I have of parsing out 2 paths should be a simple job for scan from string, but I can't seem to get the format string right.

 

string of interest is formatted like:

 

"C:\temp\file-123-456.jpg" "C:\temp\folder"

 

I just want the 2 paths (without the quotes) as string so I can convert them to path and be on my way...

 

I tried "%s" "%s" and some others with brackets but no luck yet...

 

thanks

 

edit:spellage

edit2: looks like it's not as easy as I thought:  https://forums.ni.com/t5/LabVIEW/How-to-scan-quoted-string/td-p/730090

 

0 Kudos
Message 1 of 2
(1,407 Views)
Solution
Accepted by topic author p27

Use the bracket notation for a string.  So you can use [^"] to read a string up to a quotation mark.  So you can use "[^"]" to read the quoted string.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(1,390 Views)