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 7
Title Test Details DateTime type format
Expression
(\d{2}|\d{4})(?:\-)?([0]{1}\d{1}|[1]{1}[0-2]{1})(?:\-)?([0-2]{1}\d{1}|[3]{1}[0-1]{1})(?:\s)?([0-1]{1}\d{1}|[2]{1}[0-3]{1})(?::)?([0-5]{1}\d{1})(?::)?([0-5]{1}\d{1})
Description
Will match a date accepted by MySQL datetime type. Years with 2 or 4 digits from any range. Months with 2 digits from 00 to 12. days with 2 digits from 00 to 31. Hours with 2 digits from 00-23 Minutes with 2 digits from 00 to 59. Seconds with 2 digits from 00 to 59.
Matches
00-00-00 00:00:00 | 0000-00-00 00:00:00 | 09-05-22 08:16:00 | 1970-00-00 00:00:00 | 20090522081600
Non-Matches
2009-13:01 00:00:00 | 2009-12-32 00:00:00 | 2002-12-31 24:00:00 | 2002-12-31 23:60:00 | 02-12-31 23:00:60
Author Rating: Not yet rated. João Batista Neto
Title Test Details Byte type
Expression
^(0|[-]{1}([1-9]{1}[0-9]{0,1}|[1]{1}([0-1]{1}[0-9]{1}|[2]{1}[0-8]{1}))|(\+)?([1-9]{1}[0-9]{0,1}|[1]{1}([0-1]{1}[0-9]{1}|[2]{1}[0-7]{1})))$
Description
Not just a number, a byte type. Will match any number from range -128 to 127.
Matches
-128 | 127 | 0 | 1 | -10
Non-Matches
-129 | 128 | -0 | +0
Author Rating: Not yet rated. João Batista Neto
Title Test Details Unsigned Byte type
Expression
(0|(\+)?([1-9]{1}[0-9]{0,1}|[1]{1}[0-9]{0,2}|[2]{1}([0-4]{1}[0-9]{1}|[5]{1}[0-5]{1})))
Description
Will match an unsigned byte, from range 0 to 255
Matches
0 | 10 | 127 | 255
Non-Matches
-10 | -1 | +0 | -0 | 256
Author Rating: Not yet rated. João Batista Neto
Title Test Details Short type
Expression
^(0|[-]{1}([1-9]{1}[0-9]{0,3}|[1-2]{1}[0-9]{1,4}|[3]{1}([0-1]{1}[0-9]{3}|[2]{1}([0-6]{1}[0-9]{2}|[7]{1}([0-5]{1}[0-9]{1}|([6]{1}[0-8]{1})))))|(\+)?([1-9]{1}[0-9]{0,3}|[1-2]{1}[0-9]{1,4}|[3]{1}([0-1]{1}[0-9]{3}|[2]{1}([0-6]{1}[0-9]{2}|[7]{1}([0-5]{1}[0-9]{1}|([6]{1}[0-7]{1}))))))$
Description
Short type, will match a short number from range -32768 to 32767.
Matches
-32768 | -10 | 0 | 10 | 32767
Non-Matches
+0 | -0 | -32769 | 32768
Author Rating: Not yet rated. João Batista Neto
Title Test Details Unsigned Short Type
Expression
^(0|(\+)?([1-9]{1}[0-9]{0,3})|([1-5]{1}[0-9]{1,4}|[6]{1}([0-4]{1}[0-9]{3}|[5]{1}([0-4]{1}[0-9]{2}|[5]{1}([0-2]{1}[0-9]{1}|[3]{1}[0-5]{1})))))$
Description
Will match an unsigned short number from range 0 to 65535
Matches
0 | 100 | 65535
Non-Matches
-0 | +0 | -10 | 65536
Author Rating: Not yet rated. João Batista Neto
Title Test Details Int type
Expression
(0|[1-9]{1}[0-9]{0,8}|[1]{1}[0-9]{1,9}|[-]{1}[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-8]{1}))))))))|(\+)?[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-7]{1})))))))))
Description
Will match any integer from range -2147483648 to 2147483647.
Matches
-2147483648 | -100 | 0 | 100 | 2147483647
Non-Matches
-2147483649 | -0 | +0 | 2147483648
Author Rating: Not yet rated. João Batista Neto
Title Test Details Unsigned Int type
Expression
^(0|(\+)?[1-9]{1}[0-9]{0,8}|(\+)?[1-3]{1}[0-9]{1,9}|(\+)?[4]{1}([0-1]{1}[0-9]{8}|[2]{1}([0-8]{1}[0-9]{7}|[9]{1}([0-3]{1}[0-9]{6}|[4]{1}([0-8]{1}[0-9]{5}|[9]{1}([0-5]{1}[0-9]{4}|[6]{1}([0-6]{1}[0-9]{3}|[7]{1}([0-1]{1}[0-9]{2}|[2]{1}([0-8]{1}[0-9]{1}|[9]{1}[0-5]{1})))))))))$
Description
Will match any unsigned integer from range 0 to 4294967295
Matches
0 | 1000 | 4294967295
Non-Matches
-100 | -0 | +0 | 4294967296
Author Rating: The rating for this expression. João Batista Neto
   Displaying page 1 of 1 pages; Items 1 to 7

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