LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search in a string

Solved!
Go to solution

Hallo Guys,

 

      I have an array of strings (list of the names of the mesurements, For example, PVE_12S1, PVE_12S2, PVE_12S3, PVK_12S1, PVK_12S2, PVK_12S3, PtVE_12S1, PtVE_12S2, PtVE_12S3). As an out put I have to group the names ending with same number (for Example i should the out put as PVE_12S1, PVK_12S1, PtVE_12S1) when I Enter 1 as my desired number. Hope you guys can help me. Thanks in advance

0 Kudos
Message 1 of 6
(2,704 Views)

It seems to me that the "ID" is always prepended by an underscore ('_'). If that is true for all strings, i would iterate through the array, look at each string for anything following that underscore and sort the elements appropriately.

I have the impression that the result should be a complete, independent array of strings. So "sorting" refers to "build a new array with only those elements which meet the search requirements".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,697 Views)

Thanks for the instant reply. But there are some names (PVE_12D1, PVE12D2, PVE_12D3) where the PVE_12D1 should also come into my out put. Thanks

0 Kudos
Message 3 of 6
(2,690 Views)
Solution
Accepted by topic author harisskriss85

What have you tried?

 

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 4 of 6
(2,673 Views)

Thanks alot. 

0 Kudos
Message 5 of 6
(2,667 Views)

Alot didn't help you; I did. 😄

 

http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html

 

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
(2,660 Views)