RegularExpressionValidator

David_nyh

Member
Joined
Mar 4, 2005
Messages
16
Programming Experience
Beginner
How does the RegularExpressionValidator code look for an isbn nummer like 00-000-0000-0 or 00-000-0000-x and for tel 0000 00 00 00 or 000 00 00 00.

Thanks
 
^\d{2}-\d{3}-\d{4}-\w{1}$ for the first isbn numbers. Something similar for the tel numbers. Basically this is looking for a match of a string that has two digits, hyphen, three digits, hyphen, four digits, hyphen, then either one digit or letter value.
I haven't tried it actually, but it should work. Something similar could be used for the telephone numbers.
 
Back
Top