You are viewing limited content. For full access, please sign in.

Question

Question

allow alphanumeric

asked on May 10, 2017

Hello,

I added the regular expression [A-Za-z0-9]+ to a text field so that it accepts alphanumeric values only.

However, this field must reject numbers only. Briefly, the field must accept a value like "John" and "Paul2" but must reject "123". Please advise.

Best Regard,

-Guillaume

0 0

Replies

replied on May 10, 2017

This might be a little more robust and should allow any combination except all digits:
(?!^\d+$)^.+ 

 

1 0
replied on May 10, 2017

You can do something like this \D{1,3}[A-Za-z0-9]+

Basically it's just saying that the first couple characters can't be numbers

The \D means a non-digital character

{1,3} means a few as 1 and as many as 3 characters, you can set this to something that fits your expectations

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.