LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parsing mid string data

Solved!
Go to solution

I'm pretty new to LV and I'm trying to figure out a way to parse data from the middle of a string set. an example of the data: 854560@67042850@600,000@151168390748@1000477480@00000000000000000

 

From this I'm trying to extract the first 6 digits (854560) and the 10 digits (1000477480). The length of the other numbers changes from data set to data set that I'm working with but the "@" symbols are always involved. So, I'm wondering if there is a method to extract the left 6 and between the 4th and 5th @ symbol.

 

Thanks.

0 Kudos
Message 1 of 3
(2,988 Views)
Solution
Accepted by topic author cb4004

If you're always going to have @ symbols as a delimiter and it will always be the same number of elements, you can just convert to an array using "@" as the delimiter and pull the first and 5th elements.

AtSymbolDelim.PNG

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 3
(2,973 Views)

A LabVIEW function that simplifies problems like this is "Spreadsheet String to Array" (which should maybe be called "Delimited String to Array" instead). Set your delimiter to @ and you'll get an array of values, with all the @s removed. Index out the desired array element.

Message 3 of 3
(2,971 Views)