02-27-2011 10:44 AM
So just to make clear.
Input string can be something like : washington dallas seattle
Your items you want to search is in a list like : ington and shington
And you want to retrieve which search is found?
Kind regards
Bjorn
02-27-2011 10:53 AM
Hi,
if this is the case, then the attached file could be a solution. If not, please try to explain what is wrong.
Kind regards,
Bjorn
02-27-2011 10:55 AM
Forgot the -1 case
😉
02-27-2011 02:19 PM
Thanks Bjorn, this is exactly what I wanted.
Agy.
02-27-2011 02:58 PM
If you like the solution, think about kudo's 😉
Set this item to solved as well 😉
Have fun. If you have any questions in the future, just let me know
03-01-2011 02:24 PM
Hi Bjorn,
Looks like I have to get back to this. In your solution, looks like you are trying to match elements from the table to the elements from the incoming string. But instead I needed to ffind to match incoming strings with elements in the table.
The example obove from Jim is the right one but I need to output both the matching strings and all its substrings. and to make it nice, I would also output "not found" for elements for elements that are in my incoming strings but they are not in the table.
for example if my incoming string is "washington, dallas, seattle, london" and my table has "shington, ington, las, seat, washington..." the output would be : shington, ington, washingtom, notfound, las, seat, notfound.
so the output are elements find in the table for each incoming string.
Your help will help.
Thank you
03-01-2011 03:08 PM
Hi Agyna,
OK, let's try it with the next solution. I've added an image in attachement as well if you don't know how to use a VI snippet. As you can see in the image, it give you the output (array) : shington, ington, washington, las, seat, notfound. If you want this in a string, you just have to use "array to spreadsheetstring".
If anything isn't clear, just send a message
Kind regards,
Bjorn
03-01-2011 03:10 PM
No doubt you understand that the inputstring is still in codes display just to show you how to create an array from a string. If you have any other other delimiter, just change the delimiter wired to the spreadsheetstring to array VI
03-01-2011 05:34 PM
Not working for me, any idea what is wrong here?
or can you send me the vi file your did. I am using labview 2010.
Thanks,
agyna
03-02-2011 12:41 AM
Hi agyna,
the example is a snippet. You can drag it into LabVIEW to get the code. I think the mistake in your code is the conversion from string to string array. Is the string constant in "code display" mode? You need it the get the correct representation of "\s".
Hope it helps.
Mike