ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

splitting a string

Solved!
Go to solution

I apologize for posting yet another trivial question about splitting strings. I read through many suggestions for this, and didn't see

a general answer.

 

String: asd_dw_22_Lx-2.gm

How do I split this into asd, dw, 22, Lx-2.gm (clearly the desired string components are those elements separated by "_").

The output should not be a specific component, but any number of components. I imagine a VI that takes the above string

as input, and knows the delimeter is an underscore, and outputs asd, 22, Lx-2.gm.

 

Now, what if the separator is a dot, a tab, a space, etc. Is there a VI that takes an input string, a separator (defined by the user),

and spits out anything it finds between the defined separators?

0 Kudos
Message 1 of 4
(3,321 Views)
Solution
Accepted by topic author murchak

Yes. Spreadsheet String to Array.

 

Message 2 of 4
(3,319 Views)

Thanks!

How do I wire a constant string array to the array type.

When I right-click and create a constant, it is of type 2D double. I can easily change

it to 1D, but how do I change that to a string type?

0 Kudos
Message 3 of 4
(3,312 Views)

Got it!

 

Thank you very much

0 Kudos
Message 4 of 4
(3,304 Views)