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 Allow + , 0 and - whole numbers
Expression
[0-9]+|-[0-9]+
Description
MS ASP.NET 2010 Allows positive, negative whole numbers. Allows zero. Does not allow real (decimal) numbers nor anything containing alphabet characters. Simple and sweet
Matches
9, 0, -9, 1000, -1000
Non-Matches
a1, 1.1
Author Rating: Not yet rated. Stew Muskie
Title Test Details Integer and Decimal Exchange Rate
Expression
(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,5})?$
Description
I was searching for an Exchange rate expression. Nice thing about this is that it is less sensitive for large numbers and more sensitive (more decimal places) for small decimals to 5 decimal places.
Matches
1, 0.11111, 10000.1,
Non-Matches
0.111111, 2a, 1/8, -1, 0, 1000000.1
Author Rating: Not yet rated. Stew Muskie
Title Test Details UK Date and Time Full
Expression
(([0-2]{1}[0-9]{1})|([3-3]{1}[0-1]))/[1-12]{2}/[1900-2999]{4}\s(([0-0]{1}[0-9]{1})|([1-1]{1}[0-9]{1})|([2-2]{1}[0-3]{1})):[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}
Description
UK Data and Time Use an 'onupdated' method to correct '31/02/2012' to 28/02/2012, for example. MS Visual Studio 2010
Matches
18/12/2012 09:52:07 31/02/2012 09:52:07
Non-Matches
32/12/3000 09:52:07
Author Rating: Not yet rated. Stew Muskie
   Displaying page 1 of 1 pages; Items 1 to 3

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