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 2
Title Test Details Pattern Title
Expression
^\d{1,5}(\.\d{1,2})?$
Description
validate a number 5 digits and 2 decimal places allowing zero
Matches
12345.67 | 0 | 0.1
Non-Matches
123456.78 | 123456.789 | .1
Author Rating: The rating for this expression. Paul Ashton
Title Test Details Pattern Title
Expression
(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,2})?$
Description
validates to 5 digits and 2 decimal places but not allowing zero
Matches
12345.12 | 0.5
Non-Matches
123456.12 | 1.234 | .1
Author Rating: Not yet rated. Paul Ashton
   Displaying page 1 of 1 pages; Items 1 to 2

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