From: "Greg Pelly" <[EMAIL PROTECTED]>
> Here's a better mask to use:
>
> mask
> ^\$?\d+(,\d{3})*(\.\d{2})?$
>
This is *perfect*! Thanks also to Hubert for reminding me about 'mask' in
the first place. :)
--
Wendy Smoak
---
ttern.exec("$1,500,200.99")) {
alert ('matches');
} else {
alert ('does not match');
}
HTH,
Greg
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 3:39 PM
To: Struts Users Mailing List
Subject: R
I'm useless with regex. However, I found this on the web some time
ago and seemed to match what I needed back then:
mask
^(?:\d+|\d{1,3}(?:,\d{3})*)(?:\.\d{1,2}){0,1}$
This allows them to include the ".00" if they so desire.
hth,
Hubert
On Apr 6, 2005 5:08 PM, Wendy Smoak <[EMAIL PRO
I have a form with a required "amount". The users like to enter things like
$50k which thoroughly confuses the system that tries to send a different
email if the amount is over or under $25,000. I think I can make them stop
entering dollar signs and letters... but I don't think they'll part with
4 matches
Mail list logo