LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

alphanumeric string


@Jeff Bohrer wrote:

of course there is the Lexical class function on the comparision palatte to do all the regexs for you!

 

Hmmmmm This round thing is neat--- I should call it a "Wheel"


The OP asked how to test a string; your wheel would need a loop around it to test every character.  On the other hand, I never think to use the Lexical Class function because I have a hammer.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 11 of 20
(959 Views)

@jcarmody wrote:

@Jeff Bohrer wrote:

of course there is the Lexical class function on the comparision palatte to do all the regexs for you!

 

Hmmmmm This round thing is neat--- I should call it a "Wheel"


The OP asked how to test a string; your wheel would need a loop around it to test every character.  On the other hand, I never think to use the Lexical Class function because I have a hammer.


Well, Jim beat me to the punch.  I was going to suggest a "side by side" comparison to see which solution makes it to the Rube Goldberg thread.

0 Kudos
Message 12 of 20
(949 Views)

@Darin.K wrote:

@jcarmody wrote:

@Jeff Bohrer wrote:

of course there is the Lexical class function on the comparision palatte to do all the regexs for you!

 

Hmmmmm This round thing is neat--- I should call it a "Wheel"


The OP asked how to test a string; your wheel would need a loop around it to test every character.  On the other hand, I never think to use the Lexical Class function because I have a hammer.


Well, Jim beat me to the punch.  I was going to suggest a "side by side" comparison to see which solution makes it to the Rube Goldberg thread.


Gosh!  bust my chops!!!!  the OP did state he wanted to test every character

 

"suppose i give a single character and it should check for alphanum....


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 20
(946 Views)

Repeat after me:  "Don't Mess With Texas Regexes!"  Smiley Wink

0 Kudos
Message 14 of 20
(942 Views)

oh heck.... just 7.0 type cast it  Smiley Very Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 20
(940 Views)

Here is my side by side:

 

AlphanumericSideBySide.png

 

Now can someone explain to me again why And Array Elements returns true for an empty array?

Message 16 of 20
(932 Views)

@Darin.K wrote:

Here is my side by side:

 

AlphanumericSideBySide.png

 

Now can someone explain to me again why And Array Elements returns true for an empty array?


WAY off topic---

 

You had this expained before?  the cat is dead and alive at the same time


"Should be" isn't "Is" -Jay
0 Kudos
Message 17 of 20
(927 Views)

Hopefully the OP's question has been answered five different ways so this diversion is ok.

 

Explanations I have heard range from the ever helpful "It has to return something" to the slightly more informational "The default use is to look for a single false in a sea of true values, so the de facto default is true".  In my mind, Booleans are False until explicitly set to true so empty elements should be considered False (like in Or Array Elements).  The annoyance is that this choice requires negation to add a check for the empty case.  And Array Elements AND NOT Empty Array.  If AndAE returned False instead, you could use a simple OR with the Empty Array check to get back the current behavior if you so desired.

Message 18 of 20
(916 Views)

This conversation was very useful and i got to see different ways to approach this problem .Thanks once again .

0 Kudos
Message 19 of 20
(897 Views)

@Darin.K wrote:

Hopefully the OP's question has been answered five different ways so this diversion is ok.

 

Explanations I have heard range from the ever helpful "It has to return something" to the slightly more informational "The default use is to look for a single false in a sea of true values, so the de facto default is true". 


From a performance standpoint i guess that's the solution choosen since it'll stop the comparison earlier and could save lots of comparisons. The function should include "and not empty array" in itself since, as you say, an empty array should default to false.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 20 of 20
(893 Views)