Page 1 of 1

beginners question

PostPosted: Tue Sep 21, 2004 9:54 am
by evvo
Hi im a beginner to regular expressions really, just learning the basics, at the moment i require to be able to do some basic validation checking on numbers and hoped for some help here.

for example, our council tax ref numbers are in format of 8 numeric characters and begin with a 3 or a 2, such as 31000044 or 28443562.

my form needs to validate these on this basis so could anyone provide a regex that would do this?

thanks

PostPosted: Tue Sep 21, 2004 11:17 am
by Quade
Well, this is a "Newsbin Regular Expression" forum. Not a general purpose one.

PostPosted: Tue Sep 21, 2004 4:21 pm
by Smite
Code: Select all
^[23]\d{7}$

should work