I have an input string in which I have numbers between the <ele> and <\ele> tags. I'd like to extract all these numbers into a numeric array. While I have no problem to realize this function with some of the basic VIs of LabVIEW, somehow I have a gut feeling that there is a more elegant way to do it (maybe using the scan from string node)
I have attached the screenshot of my current solution. Please advise.
My solution works completely fine, but I believe the scan from string method is more intuitive as it is more visible what are we exactly searching for in the format options input. (so whoever reads the code doesnt have to put the pieces together like in my version)
Personally I prefer using regular expressions for matching. They are much more flexible. Notice this will work for various forms of the input. In addition, the code below uses fewer operations (no need for a second or third pattern match. You do end up with an extra element at the end of the array but that is easy to strip off.
Using Mark solution you can use the conditional tunnel mode to avoid the last empty element.