• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

check if alpha or number only

My previous question. http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_27379919.html
How can I check to see if alpha or number only and the lenght is only 5?
0
VBdotnet2005
Asked:
VBdotnet2005
  • 2
1 Solution
 
VBdotnet2005Author Commented:
something like this

If Regex.IsMatch(myString, "^[A-Za-z0-9]+$") Then  , but len can be up to 3 only
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Regex.IsMatch(myString, "^[A-Za-z0-9]{1,3}$")

Open in new window

Between 1 and 3 (your question said 5)
0
 
VBdotnet2005Author Commented:
thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now