08-09-2011 03:10 AM - modificato 08-09-2011 03:11 AM
Hello!
It seems like a simple problem, but I am stuck:
I have a string array and I want to search each cell for a certain substring:
house
bed
Profile "something"
car
whatever
EndProfile
GlobalProfile
I want to find out in which row the substring "Profile" appears (at the beginning). As the string that comes after "Profile" always changes, I cannot compare the whole string. If I find a row with the word "Profile" then I want to have the index of that row. I don't want to divide any strings, I just need said index.
Can someone please help me?
Edit:
I have tried to compare strings using an asterisk, but if I search for "Profile*" then it doesn't find anything.
in data 08-09-2011 05:01 AM
Use a For Loop to index each element individually and use Match Pattern inside to find the string with "Profile". The loop count when you find it is your index.
in data 08-09-2011 05:15 AM
Hi
You need to look at the match pattern VI or regular expression VI and learn about pattern matches simple example
in data 08-09-2011 05:16 AM
you beat me to it Jim 🙂