10-06-2010 11:02 PM
I'm looking for a simple way to do it or any built-in subVIs that can do this.
I have 3 strings "1234c", "ab3dc". "xya", I want to identify the ones that have numbers and retrieve all numbers. So one important step is to distinguish the numeric characters and non-numeric characters. How can I do it in Labview with built-in subVIs?
Thanks
Solved! Go to Solution.
10-06-2010 11:27 PM
Hi mugger,
Use match Pattern from function palette>>String functions.
Read help file you will come to know about its function.
You can find A sequence of one or more digits and characters using this function.
Best Of Luck
10-07-2010 05:11 AM
[0-9] looks for a number, "+" makes the search look for 1 or more of them (it's "greedy", so it'll get as many as there are.) I added one more string to your list to show that Match Pattern will match only the first instance of a number. If there's a chance that you'll have data like the last element you'll need to run it in a loop. Decimal String to Number can also work if a digit is the first character it finds.
10-11-2010 05:57 PM
How are the strings created? do you have the control to structure these?
10-26-2010 12:27 PM
Thanks buddy, that really helpes alot!
Another question is I have a XY graph with multiple cursor on it. I'd like to drag cursors, one at a time. So my question is how can I let labview know which one I drag? any idea?
10-26-2010 04:34 PM
@mugger wrote:
Another question is I have a XY graph with multiple cursor on it. I'd like to drag cursors, one at a time. So my question is how can I let labview know which one I drag? any idea?
You should start another thread for this question.
10-26-2010 07:10 PM
For single characters there is the "lexical class" node under comparison. I'm just mentioning it since it's not a very well known node.