LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan from string help

Hi all,

 

From the below string I want to obtain:

 

VALUE 1 I WANT

VALUE 2 I WANT

VALUE 3 I WANT

 

These headings or titles of the values will always remain the same in the string.

 

I'm sure this can be done simply using the scan from string function but cannot figure out the sytax/method.

 

Thanks.

 


 

 

Random text
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
VALUE 1 I WANT: 1234
6th June 2016
 
Random text
 
==========
 
Random text
 
Random text
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
HEADING 1
 
VALUE 2 I WANT: string
VALUE 3 I WANT: 1234
 
Random text
 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
0 Kudos
Message 1 of 5
(3,056 Views)

This seems to work.  Just using a couple of Match Pattern functions.


GCentral
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 5
(3,050 Views)

Thanks but is it possible to do it using the Scan from string.vi?

 

Scan from string.png

0 Kudos
Message 3 of 5
(3,038 Views)

 

Please  go through the thread linked below

http://forums.ni.com/t5/LabVIEW/scan-from-string-error-85/m-p/3285591

 

 

if still facing any problem 

Please try this123.JPG

0 Kudos
Message 4 of 5
(3,016 Views)

Hello,

 

This is quite a universal approach:

 

Match Key - Value - with regular expressions.png

 

Match Key - Value - with regular expressions FP.png

Greets, Dave
0 Kudos
Message 5 of 5
(2,990 Views)