Displaying page
of
pages;
Items to
Title |
Test
Details
Numeric including commas, decimal, negative, and currency
|
Expression |
^((\$?\-?)|(\-?\$?))([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)?(\.[0-9]*)?$
|
Description |
Matches any number which includes the US currency symbol ($), a negative sign (-), comma separators, and a decimal. It matches an unlimited number of decimal places. It does NOT reject an empty string passed to it. Credit goes to Al Kahler for posting the original expression from http://regxlib.com/REDetails.aspx?regexp_id=70 along with a fix for the decimal place.
|
Matches |
$.01 | 1,234.003 | 834223.1 | $0.01 | -$1.50 | $-50.123
|
Non-Matches |
.0,001 | 1,1.01 | 1E | 5$
|
Author |
Rating:
Ed Hammar
|
Displaying page
of
pages;
Items to