11-23-2010 11:40 AM
Hello,
I am new to Labview. This probably simple but couldn't figure it out.
Here is my question.
I am trying to search in a csv file and look up string match pattern like "test" and display in an array.
My problem is I couldn't figure how to just display the match result only and don't want to display the empty field.
This might be confusion but please find the attached csv file and the VI.
Please help.
Thank you
marlin
11-23-2010 12:31 PM
Hi Marlin,
I am confused by your question. You say that you want to display the match results, but how? You already know what the results look like because it is the text you searched for. Do you want to know how many matches there were?
11-23-2010 12:53 PM
Hi Jim,
Sorry for the confusion.
And you're right, I would like to know how many test are in the file or matches.
For example in the file there are 4 tests done and I want be able to search thru file until end of file and be able to display the result that there are 4 test total. There could be 5 test in the file or 6 or 7 etc...
I hope this make sense.
Thank you again Jim
marlin
11-23-2010 02:18 PM
@marlin12 wrote:
don't want to display the empty field.
To get it to not have the empty fields, you can't use the auto indexing on the For Loop, but use a case statement (or Select) to only add to the array using build array when you have a match.
11-23-2010 02:19 PM
Marlin,
I modified your VI, but left your code in place.
Jim
11-23-2010 03:21 PM
Hi Jim,
Thank you so much, it's exactly what I needed.
marlin