Displaying page
of
pages;
Items to
Title |
Test
Details
capture numbers with/without commas
|
Expression |
\$(\d*)??,??(\d*)??,??(\d*)\.(\d*)
|
Description |
This captures (for filters out non digits) numbers with or without commas (eg currency as above) in the correct order - the other examples I see here don't capture in right order for all combinations. It doesn't check lengths or leading digits or number of digits between commas- that is left as an exercise for the student.
First example gives:[4],[234],[567],[89]
Second gives:
[],[1],[234],[80]
rather than the incorrect:
[1],[],[234],[80]
|
Matches |
$1,234,567.89 | $1,234.80 | $34.45 | $1234.5
|
Non-Matches |
$1,234 | $123-45 | $-123.00
|
Author |
Rating:
Not yet rated.
david t
|
Displaying page
of
pages;
Items to