LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string array indexing

Hello there,
 
Here's something i need help with.
I'm having a 2D string out of which I extract one colum as an array(1D) and  i'm matching for a regular expression. For every match in this 1D array I need the element index to output the corresponding row in which the element is present in the 2D array.
 
Here's someting about the matching requirement:
 
The matching process should be such that, :
 
If i typed in , "d", it should give out all the element indexes starting from letter "d"
 
 
Thanks
 
 
Shaun
 
 
 
0 Kudos
Message 1 of 4
(2,834 Views)
Shaun
 
You could do something like this
 
 
This demonstrates using the Index Array, Match Pattern and Build Array Functions and shift register to do what you want.
 
Build it up and try it out.
 
cheers
 
David

Message Edited by David Crawford on 10-03-2006 03:56 PM

0 Kudos
Message 2 of 4
(2,822 Views)


@pk120 wrote:
I'm having a 2D string out of which I extract one colum as an array(1D) and  i'm matching for a regular expression. For every match in this 1D array I need the element index to output the corresponding row in which the element is present in the 2D array.

Please clarify your requirements. Do you want the row index only for elements in the column where the match occurred or do you want all 2D indices that match in the entire array?

It is always best if you could attach a simple VI containing your 2D array e.g. as diagram constant or as default values in a control. Also create an indicator that contains the expected result as default value.

0 Kudos
Message 3 of 4
(2,812 Views)
0 Kudos
Message 4 of 4
(2,783 Views)