Unless there's some regional standard that I'm unfamiliar with, currencies (in fact, any numbers) are *always* grouped in threes. Otherwise the commas are meaningless.
Steve > -----Original Message----- > From: david chan [mailto:[EMAIL PROTECTED] > Sent: August 14, 2003 9:12 AM > To: Struts Users Mailing List > Subject: RE: validation mask for currency > > > Thanks. But the comma can be in anywhere in between > first digit and the period. > > so this is valid also: > 1,23,22 > 1234,2.3 > > how to do that? (I am really new to regular > expression) > > Thanks. > David > > --- Yansheng Lin <[EMAIL PROTECTED]> wrote: > > Try: > > <field > > property="xxxx" depends="mask" > > <msg="mask" key="xxx.displayname"/> > > <var> > > <var-name> mask</var-name> > > > > > <var-value>^\d{1,3}(,?\d{3})*\.?(\d{1,2})?$</var-value> > > </var> > > </field> > > > > I tested your numbers, it seemed to work; but more > > testing needed:). > > > > > > > > -----Original Message----- > > From: david chan [mailto:[EMAIL PROTECTED] > > Sent: August 14, 2003 8:09 AM > > To: Struts Users Mailing List > > Subject: validation mask for currency > > > > > > Hi, > > I need a regular expression for checking the dollar > > among inputed by user (using validator struts 1.1 > > mask) > > Here are some valid money (comma and period are > > allowed in specify location): > > > > 432,343.12 > > 212.12 > > 0.00 > > 1294 > > > > The max. value should be less than 9999999 > > > > Any regular expression expert can help? > > > > Thanks. > > David > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > > design software > > http://sitebuilder.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] > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.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]