help with validating a textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i'm trying to validate a textbox on my form with the following expression:
0.a.0.a

meaning I need to make sure the user follows this pattern.
0-9
period
A-Z
period
0-9
period
a-z

can someone direct me to a good reference article because i can't find
anything basic with regular expressions in msdn help so far.

thanks,
rodchar
 
Thankfully, you have mostly described the expression. It is:

^\d\.[A-Za-z]\.\d\.[A-Za-z]$

^ and $ force the text to be the entire text
\d = all digits
\. = period
[A-Za-z] = set of upper and lowercase letters.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
thank you very much.

Peter Blum said:
Thankfully, you have mostly described the expression. It is:

^\d\.[A-Za-z]\.\d\.[A-Za-z]$

^ and $ force the text to be the entire text
\d = all digits
\. = period
[A-Za-z] = set of upper and lowercase letters.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

rodchar said:
hey all,

i'm trying to validate a textbox on my form with the following expression:
0.a.0.a

meaning I need to make sure the user follows this pattern.
0-9
period
A-Z
period
0-9
period
a-z

can someone direct me to a good reference article because i can't find
anything basic with regular expressions in msdn help so far.

thanks,
rodchar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top