LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract numbers from string output

Solved!
Go to solution

Hi

 

I would like to know what is the most efficient way (in terms of execution speed) to extract the red highlighted numeric values from this string output:

1536x1103 0.83X 32-bit RGB image 85,85,85 (748,668)->(844,859) [213.77,296.68°].

 

I have attached a sample vi. Is this an efficient way to code it (in terms of execution speed)?

 

- Sable

 

 

 

0 Kudos
Message 1 of 4
(2,105 Views)

Hi

 

I would like to know what is the most efficient way (in terms of execution speed) to extract the red highlighted numeric values from this string output:

1536x1103 0.83X 32-bit RGB image 85,85,85 (748,668)->(844,859) [213.77,296.68°].

 

I have attached a sample vi. Is this an efficient way to code it (in terms of execution speed)?

 

- Sable

 

 

 

Download All
0 Kudos
Message 2 of 4
(2,109 Views)

I think the Search/Split String is supposed to be a little more efficient than Match Pattern as it uses a much simpler search algorithm (byte search instead of regular expression).  Otherwise, you have exactly what I would do.


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
0 Kudos
Message 3 of 4
(2,093 Views)
Solution
Accepted by topic author Sable

You only actually need one space in your format string.  This will detect 0 or more white spaces (spaces, tab, linefeed or form feed). 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 4
(2,059 Views)