struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alvarado, Juan (c)" <Juan.Alvar...@NielsenMedia.com>
Subject Validator
Date Tue, 14 Jan 2003 16:48:51 GMT
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>


Mime
View raw message