01-27-2015 06:18 AM
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
Solved! Go to Solution.
01-27-2015 06:22 AM
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
01-27-2015 06:41 AM
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
01-27-2015 07:10 AM
01-27-2015 07:20 AM
Thanks alot.
01-27-2015 07:29 AM
Alot didn't help you; I did. 😄
http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html