RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 3
Title Test Details 0 - 100 Percentage
Expression
^100(\.0{0,2})? *%?$|^\d{1,2}(\.\d{1,2})? *%?$
Description
Match any percentage entered between 0.00 and 100.00%, includes up to 2 decimal places. Percent sign is optional
Matches
100% 100.00 % 95.4% 1.2 % 12
Non-Matches
100.01% 120% -1.2% 95.445% 12%%
Author Rating: The rating for this expression. Tom Grieve
Title Test Details Percentages between -100 and +100 %
Expression
^[+-]? *100(\.0{0,2})? *%?$|^[+-]? *\d{1,2}(\.\d{1,2})? *%?$
Description
Match any percent from -100.00% to +100.00% up to 2 decimla places. Percent sign is optional
Matches
-96.4% -100% 100% 9% 9.10%
Non-Matches
-101% 101% 100.01% 9.288%
Author Rating: The rating for this expression. Tom Grieve
Title Test Details Currency
Expression
^[+-]? *(\$)? *((\d+)|(\d{1,3})(\,\d{3})*)(\.\d{0,2})?$
Description
Full currency testing, allows up to 2 decimal places. Checks for corect formatting with commas etc, and allows negative amounts
Matches
$ 10.00 -$12 $12 $12,122.90
Non-Matches
--$10 $123,1234.00
Author Rating: Not yet rated. Tom Grieve
   Displaying page 1 of 1 pages; Items 1 to 3

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials