^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$
RegEx to Match US currency with or without dollar sign
This regex also allows for the correct placement of commas in the number.
Snippet Viewed 4602 times.
Share your RegEx code snippets:
- Get some recognition & a link back to your site.
- Create your own code library.
- Help your fellow developers, as they have helped you.
Related Articles