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 Pattern Title
Expression
(^\d*\.?\d*[1-9]+\d*$)|(^[1-9]+\d*\.\d*$)
Description
Accepts only positive decimal values. Zero and negatvie numbers are non-matching. Allows zeros after last non-zero numeric value after decimal place for significant digits.
Matches
0.050 | 5.0000 | 5000
Non-Matches
0 | 0.0 | .0
Author Rating: The rating for this expression. Bri Gipson
Title Test Details Pattern Title
Expression
(^-\d*\.?\d*[1-9]+\d*$)|(^-[1-9]+\d*\.\d*$)
Description
Accepts only negative decimal values. Zero and positive numbers are non-matching. Allows zeros after last non-zero numeric value after decimal place for significant digits.
Matches
-0.050 | -5.000 | -5
Non-Matches
0 | 0.0 | .0
Author Rating: Not yet rated. Bri Gipson
Title Test Details Pattern Title
Expression
^(?=.*[1-9].*$)\d{0,7}(?:\.\d{0,9})?$
Description
Allows up to seven digits to the left and up to nine digits to the right of an optional decimal place. Leading zeros on the left of the decimal are accepted. Only positive values are accepted.
Matches
1 | 0123456.123456789 | .123456789
Non-Matches
.0123456789 | 0.0 | -1
Author Rating: Not yet rated. Bri Gipson
   Displaying page 1 of 1 pages; Items 1 to 3

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