From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expressions on strings

How would I go about creating a regular expression in LabVIEW that, say, takes an input of a list of numbers (1, 2, 3, 4, 5) and turns it into an array with the elements [1, 2, 3, 4, 5]? If someone could show me example code, I would be quite grateful.

 

Thanks.

Using LabVIEW 2009 on Windows Vista
0 Kudos
Message 1 of 3
(2,291 Views)

Hi dragon,

 

to convert the string "1,2,3,4,5" into an array you should use the "spreadsheet string to array" function with a separator of "," Smiley Wink When you need an array of numbers instead of strings (you only wrote "elements") you use "decimal string to number"...

Best regards,
GerdW


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

Spreadsheet String to Array should work for conversion to strings or numbers...

Richard






0 Kudos
Message 3 of 3
(2,274 Views)