Displaying page
of
pages;
Items to
Title |
Test
Details
Currency amount with or without $ and with commas
|
Expression |
^\$?\d{1,2}\,\d{3}?\,\d{3}?(\.(\d{2}))$|^\$?\d{1,3}?\,\d{3}?(\.(\d{2}))$|^\$?\d{1,3}?(\.(\d{2}))$
|
Description |
Needed to verify a currency amount entered has commas and two decimal spaces to the right. This has a range between 1.99 to the tens of millions. If you want to make the decimal side optional, add a question mark before the final $ in each expression.
|
Matches |
1.99|111,111.99|11,111,111.99
|
Non-Matches |
1.999|1111|1111111|11.9
|
Author |
Rating:
Not yet rated.
dawn schakett
|
Displaying page
of
pages;
Items to