I have a txtbox on my web form. I need to check if the second character is a "C" and the next three characters are numeric. Is there a way I can do this with the RegularExpressionValidator?
thanks,
eye
Printable View
I have a txtbox on my web form. I need to check if the second character is a "C" and the next three characters are numeric. Is there a way I can do this with the RegularExpressionValidator?
thanks,
eye
hmm...I THINK
[C]\d\d\d
might be the reg expression.. at least that is the best I can figure out from my book which only has very little info on it
the [C] mean the letter c and \d mean any digit from 0-9
oops..second characterQuote:
Originally posted by EyeTalion
I have a txtbox on my web form. I need to check if the second character is a "C" and the next three characters are numeric. Is there a way I can do this with the RegularExpressionValidator?
thanks,
eye
[a-z][c]\d\d\d
shorter version
[a-z][c]\d{3}
error message is still popping up. I'm using "[a-z][c]/d{3}" and placing this value in my textbox "1c234"
I'll keep ya posted...
try this one
[a-zA-Z0-9][cC]\d{3}
that will let any letter or number(upper or lower case) for first
c(upper or lower case) for second, then 3 digits.
it's working....I was placing a digit in the first value...d'uh!
thanks
;)