Title |
Test
Find
Pattern Title
|
Expression |
^(\$)?(\s)?(\-)?((\d+)|(\d{1,3})(\,\d{3})*)(\.\d{2,})?$ |
Description |
Allows either inclusion of $ symbol or not. Allows a whitespace character after the $ sysmbol or not. Allows a negative symbol in front of the starting digit or not. Allows comma separators at thousands, but nowhere else. Allows more than two decimal places. |
Matches |
$1,000.00 | $-1,000.00 | 100.8766 |
Non-Matches |
$1a | $#100.00 | 1,00.00 |
Author |
Rating:
Not yet rated.
Ron Allen
|
Source |
modified from an expression by Matt Wickless |
Your Rating |
|
Title: Handy for numerics in gridviews and textboxes
Name: Rob Drake
Date: 3/20/2007 8:28:20 AM
Comment:
Ron, very cool. I use this in objects as above. Good addition would be to allow for something like (99.95) where the -ve is okay as well as the ()