LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

regular expression for Scan from String

I am trying to pick out three numbers with pattern $number1:number2:number3# from a stream, for instance 8.559509#$-1.686432:-2.427051:-7.281153#$-6.160924:-1.763356:
 
So far, I use "Scan from String" with Format string "$%f:%f:%f #". However I don't know how to ignore/delete the items before $. Would you like to help me with that? Cheers

 

0 Kudos
Message 1 of 6
(3,508 Views)

You know that your sequence of numbers begins with the $ and ends with the #, so you can separate them into groups first, then separate each number out.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(3,492 Views)

Which function should I use to separate these according to $ and #

0 Kudos
Message 3 of 6
(3,482 Views)

I have solved the problem. Thank you the hint!

0 Kudos
Message 4 of 6
(3,471 Views)

Hi jin,

 

SpreadsheetStringToArray should help:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,468 Views)

A submatch from a Match Regular Expression node can get you there:

 

Example_VI.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 6
(3,442 Views)