check if alpha or number only

Posted on 2011-10-04
Last Modified: 2012-05-12
My previous question.
How can I check to see if alpha or number only and the lenght is only 5?
Question by:VBdotnet2005

    Author Comment

    something like this

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

    Accepted Solution

    Regex.IsMatch(myString, "^[A-Za-z0-9]{1,3}$")

    Open in new window

    Between 1 and 3 (your question said 5)

    Author Closing Comment

    thank you

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now