LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing non-alpha-numeric characters from a string



rashid19672008 wrote:
What is lexical class?
It is a function that can be found in the comparison palette of LabVIEW.


rashid19672008 wrote:
Do I need to install something to have access to it?

You need to have LabVIEW installed, nothing else.

rashid19672008 wrote:
What does it do?

Once you found it, place it on the diagram and do a "right-click... help" on it. All clear? 😄
Message 21 of 25
(2,769 Views)
Gee thanks a lot smercurio… (again)! That was mighty useful info. Now I'll be able to bug you (good) guys with queries along with the pics. Sooo useful and makes life easy.

Have a very nice day!
Message 22 of 25
(2,747 Views)
Gee! Thanks a lot for such a detailed answer altenbach! And thanks again for introducing me to an overlooked member of labview functions palette. (I realized afterwards that you need to be an explorer to be real successful at LabVIEW (and everything for that matter).

Have a very nice day!
Message 23 of 25
(2,744 Views)

You could convert the string into a byte array and then in a for loop, compare every element of that array with your desired characters bytes amount on the ascii table, e.g for only numeric you would set a lower limit of 48 *ascii value of 0* and 57 *ascii value of 9* , then on the conditional terminal of the for loop, only allow the characters between them limits out, then convert the byte array into a string 🙂

0 Kudos
Message 24 of 25
(682 Views)

I certainly hope the OP wasn't waiting 14 years for a solution. Plus, a reply to this earlier discussion was right on target regarding using the lexical class. The lexical class of a character tells you exactly what it is. No need to know the ranges of characters in the ASCII tables or create more complex comparisons, i.e., does this byte fall between x and y.  Simply test if the character is of the lexical classes you are interested in.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 25 of 25
(667 Views)