?
Solved

check if alpha or number only

Posted on 2011-10-04
3
Medium Priority
?
315 Views
Last Modified: 2012-05-12
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
Comment
Question by:VBdotnet2005
  • 2
3 Comments
 

Author Comment

by:VBdotnet2005
ID: 36913646
something like this

If Regex.IsMatch(myString, "^[A-Za-z0-9]+$") Then  , but len can be up to 3 only
0
 
LVL 17

Accepted Solution

by:
Carlos Villegas earned 500 total points
ID: 36913658
Regex.IsMatch(myString, "^[A-Za-z0-9]{1,3}$")

Open in new window

Between 1 and 3 (your question said 5)
0
 

Author Closing Comment

by:VBdotnet2005
ID: 36913731
thank you
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question