Regular Expression to validate a currency of $50 or greater

I need a regular expression that will validate a value to check if it is $50 US or greater.  It should allow 2 decimal places and a comma for a thousands separator.
tracymrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ddrudikCommented:
Be as specific as possible with your request, specifically decimal, decimal places, and what of those are required/optional.
0
ozoCommented:
\$?\b(?=\d{1,3}(,?\d{3})*(\.\d\d)?\b)[5-9]\d|[1-9][\d,]{2}
0
tracymrAuthor Commented:
OK.. specifics.

I need to validate that an entry is greater than or equal to 50.00
no dollar sign
up to 2 decimal places but not required.
comma can be used as a thousands delimeter, but not required

Acceptable values would be:
50
50.00
50.01
50.1
1,000
1000.00
1000

Not acceptible:
any number less than 50
50.000 (non US version of $50,000) and only 2 decimal places

Is this better descriptively?

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tracymrAuthor Commented:
ozo,

I tried out your solution and it allows numbers less than 50 such as 4.99.

0
ozoCommented:
^\$?\b(?=\d{1,3}(,?\d{3})*(\.\d\d)?\b)[5-9]\d|[1-9][\d,]{2}
0
ozoCommented:
to match 50.1 you probably want
^\$?(?=\d{1,3}(,?\d{3})*(\.\d\d?)?$)[5-9]\d|[1-9][\d,]{2}
0
tracymrAuthor Commented:
Ozo,

We are close!

Anyway we can limit to 2 decimal places?  when I test your last one I can still enter 49.999 and it validates to true.
0
ozoCommented:
^\$?(?=\d{1,3}(,?\d{3})*(\.\d\d?)?$)([5-9]\d|[1-9][\d,]{2})
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tracymrAuthor Commented:
Ozo,

Perfect!  That last submittal does the trick.

Thanks!
0
tracymrAuthor Commented:
Thank you for your lightening fast responses! :-)
0
binoboseCommented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Regular Expressions

From novice to tech pro — start learning today.