Number regex

I am working on a regular expression that requires only a number for a dollar amount

example 500.00

Here is what I have: /[1-9]{3-5}(\.)[1-9]{2}$/

It doesn’t work though

Id also like to add a dollar sign to the front

example: $500.00

Can someone help me write this

Thanks

You left out zero from the valid numbers - that’s why 500.00 is invalid.

Try this:

/^\$?[1-9]\d{2,4}\.\d{2}$/

Take out the ? if you don’t want the dollar sign to be optional.

Thanks for the help but still doesn’t seem to work.

http://kenaesthetic.com/rfp.htm

Check estimated budget

My mistake it works. Thanks so much