PDA

Click to See Complete Forum and Search --> : Money Expression


Magiaus
Sep 16th, 2004, 09:50 AM
[$]*[0-9]*[.][0-9][0-9]

That is the expression I am using now but it forces them to enter in $0.00 I want to allow just 0 or just 0.00 or just $0.

I tried [$]*[0-9]*[.][0-9][0-9]|[0-9]*|[$]*[0-9]*

but it isn't correct. I have tried several long expressions with no luck I always end up with either only one being accepted or none... I really wish this thing had a check setup to validate the expression before build and running the project....

nemaroller
Sep 16th, 2004, 01:36 PM
Go to the place below. You can select RegEx's, test them live, even replace the text with your own and retest it. It allows you see how they match in .Net, Javascript, and/or vbScript.

http://www.regexlib.com/RETester.aspx?regexp_id=295

Magiaus
Sep 16th, 2004, 01:43 PM
thanks

Magiaus
Sep 16th, 2004, 01:48 PM
[$]*[0-9]*[.][0-9][0-9]|[0-9]*|[$]*[0-9]*|[0-9]*[.][0-9][0-9]

it says will do the trick. I'm about to test it in my project