struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durham David Cntr 805CSS/SCBE" <David.Durh...@scott.af.mil>
Subject RE: Validator
Date Tue, 14 Jan 2003 16:52:01 GMT
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:Juan.Alvarado@NielsenMedia.com]
> 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:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message