LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Parts of a string between two sets of characters.

I have the following string:

 

~Q€s}3c@%#403302852#node_WS#0#PLV1:0.00#PLV2:0.00#PLV3:0.00#ANE:0.00#WV:0#t

 

I need to get only the parts between # #.

 

Thank you

0 Kudos
Message 1 of 4
(2,431 Views)

My first stupid thought is to use the Spreadsheet String To Array with # as your delimiter.  Then you can use Decimate 1D Array to get the strings you actually care about.

 

The other route I am envisioning is to use Search/Split String to find the #, then another Search Split/String to get your value.  Repeat this in a loop until the After Match is empty.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,411 Views)

Yup the keep it simple solution of string to array is the way I would go even if it is probably much slower than split in a loop.

0 Kudos
Message 3 of 4
(2,388 Views)

Do you mean that you need this:

403302852#node_WS#0#PLV1:0.00#PLV2:0.00#PLV3:0.00#ANE:0.00#WV:0

or this:

403302852

node_WS

0

PLV1:0.00

PLV2:0.00

PLV3:0.00

ANE:0.00

WV:0

or this:

403302852

0

PLV2:0.00

ANE:0.00

?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 4
(2,372 Views)