it says match beginning of string/line, match 5 digits, match 0 or more digits and match the end of the string/line.
> -----Original Message----- > From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 10:49 AM > To: 'Struts Users Mailing List' > Subject: Validator > > > Can anyone explain to me what this regular expression means: > > ^\d{5}\d*$ -- Zip validation that comes with the validator > > I thought it meant you could only type in a five digit zip > code. Ex: 33634 > > However, I am allowed to type: 3363455 and that works. > > Of course, since I am no expert on regular expressions, I am sure I am > missing something. > > What I basically need to accomplish is to allow a user to be > able to type in > a zip code in two formats and only those two formats: > > 33634-6661 OR 33634 > > Any help is greatly appreciated. > > Thanks > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>