struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Navjot Singh <navjo...@net4india.net>
Subject Re: [OT]Help needed in wring regular expression
Date Thu, 17 Jun 2004 06:55:38 GMT
try this
[1-9]|[0-9]{1}[0-9]{1,3}

add rest of your many, few etc

HTH
navjot

RDoss@quickhire.com wrote:

> Chris:
>           thank you for your help.
>  
>           yes, I need to accept any leading zeros but it should be followed
> by any non-zero integer in that case.
> 
>  	    ([1-9][0-9]{0,3})|([Ff][Ee][Ww])|([Mm][Aa][Nn][Yy]) is working
> fine but could not enter any leading zeros. 	
> 
>           thank you.
> 
> -Ram
> 
> 
> 
> -----Original Message-----
> From: Christopher Schultz [mailto:christopher.d.schultz@comcast.net]
> Sent: Wednesday, June 16, 2004 7:25 AM
> To: Struts Users Mailing List
> Subject: Re: [OT]Help needed in wring regular expression
> 
> 
> Ram,
> 
> 
>>Initially we had to use (\d{1,4})|(FEW)|(few)|(MANY)|(many) and eventually
>>we found that it is accepting 0(zero) when we enter a integer value as
>>0(zero) or 0000 which is invalid.
>>
>>anybody have any idea about how to achieve the above using regular
>>expression. I tried finding any document to refer but I could not find one
>>for the above scenario.
> 
> 
> So, do you allow any leading zeros? Ever?
> 
> How about this:
> 
> ([1-9][0-9]{0,3})|([Ff][Ee][Ww])|([Mm][Aa][Nn][Yy])
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> .
> 

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


Mime
View raw message