RegularExpressionValidator

palehorse

Active member
Joined
Jan 28, 2005
Messages
34
Programming Experience
1-3
Hello.

I am trying to format my ValidationExpression to allow text to be entered these 4 ways only (note, 1 stands for any number and A stands for any letter)

aa1111a
aa 1111a
1111aa1111
1111 aa1111

Seperatley, the following works:

^[a-zA-Z]{2}\s*\d{4}[a-zA-Z]{1}
validates: aa1111a or aa 1111a

^d{4}\s*[a-zA-Z]d{4}
validates: 1111aa1111 or 1111 aa1111

Is it possible to validate both ways at once?
 
Top Bottom