rhoo 2 max decimal 

[+-][0-9]{0-9}("."2{0-9})
----- Original Message ----- 
From: "alexj" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 1:59 AM
Subject: Re: [OT] need help in regex expression


> ----- Original Message ----- 
> From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 06, 2003 1:48 AM
> Subject: [OT] need help in regex expression
> 
> 
> > Hi,
> > 
> > I have to validate a double field, which can be
> > negative or positive, has max 4 digits in integer and
> > max 2 digits after decimal, 
> > I have the following regex which handles some cases
> > but need help to make it work in all casses
> > 
> > \b[\d]?[\d]?[\d]?[\d]?\b[\.,]?[\d]?[\d]?
> > it works in
> > 1234.56
> > 123.45
> > 2334
> > 0.34
> > but does not work 
> > .34
> > 
> > and also i want it work for
> > -123.45
> > +234.45
> > 
> > Can any one suggest a way to modify expression or
> > write it in better way
> > 
> > Ashish
> > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to