134 regular expressions found in this category!
Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$ |
Description |
This is a regular expression to validate a date string in "MM/DD/YYYY" format, a date time string in "MM/DD/YYYY HH:MM" or a date time string in "MM/DD/YYYY HH:MM:SS" format.
It can validate date from 1600 to 2199.
|
Matches |
12/30/2002 | 01/12/1998 13:30 | 01/28/2002 22:35:00 |
Non-Matches |
13/30/2002 | 01/12/1998 24:30 | 01/28/2002 22:35:64 |
Author |
Rating:
Spring Zhang
|
Title |
Test
Details
Pattern Title
|
Expression |
^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1]))$|^([2][0]\d{2}\/([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$ |
Description |
this is a regular expression that for chinese programer!
yyyy/mm/dd hh:mm:ss |
Matches |
2002/02/03 | 2002/02/03 12:12:18 |
Non-Matches |
2002/02/36 | 02/03/2002 |
Author |
Rating:
martix wang
|
Title |
Test
Details
Pattern Title
|
Expression |
((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$)) |
Description |
This Validator Validates any date from 1800 - 9999. It takes special care of Leap years and validates any format of type mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.
Since SQL Server does not accept any date before 1/1/1753, so i hope it will meet Your Requirements.(Modified Version of Jason West's Date Validator.) |
Matches |
2/2/2000 | 02/02/2000 | 02/2/2000 |
Non-Matches |
2.2.2000 | 2-2-2000 |
Author |
Rating:
Saurabh Nath
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$ |
Description |
- validates a yyyy-mm-dd, yyyy mm dd, or yyyy/mm/dd date
- makes sure day is within valid range for the month
- does NOT validate Feb. 29 on a leap year, only that Feb. CAN have 29 days |
Matches |
0001-12-31 | 9999 09 30 | 2002/03/03 |
Non-Matches |
0001\02\30 | 9999.15.01 | 2002/3/3 |
Author |
Rating:
Rex Po
|
Title |
Test
Details
Pattern Title
|
Expression |
^(((\d{4})(0[13578]|10|12)(0[1-9]|[12][0-9]|3[01]))|((\d{4})(0[469]|11)([0][1-9]|[12][0-9]|30))|((\d{4})(02)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(02)(29))|(([13579][26]00) (02)(29))|(([0-9][0-9][0][48])(02)(29))|(([0-9][0-9][2468][048])(02)(29))|(([0-9][0-9][13579][26])(02)(29))|(00000000)|(88888888)|(99999999))?$ |
Description |
it's for date in the format: "yyyymmdd" and it validates the empty string and some special values (00000000,88888888,99999999) but you can delete these last values. It works with leap years. |
Matches |
20041212 | 20040229 | 88888888 |
Non-Matches |
20040230 | 20041330 |
Author |
Rating:
Artu
|
Title |
Test
Details
Pattern Title
|
Expression |
(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$) |
Description |
Matches a string if it is a valid time in the format of HH:MM / H:MM / HH / H |
Matches |
10:35 | 9:20 | 23 |
Non-Matches |
24:00 | 20 PM | 20:15 PM |
Author |
Rating:
Nacho Varas
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$ |
Description |
Matches U.S. dates with leading zeros and without and with 2 or four digit years |
Matches |
01/01/2001 | 1/1/2001 | 01/1/01 |
Non-Matches |
13/01/2001 | 1/2/100 | 09/32/2001 |
Author |
Rating:
Chris Becker
|
Title |
Test
Details
M/d/y Date
|
Expression |
^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[13-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$ |
Description |
This expression validates dates in the US m/d/y format from 1/1/1600 - 12/31/9999. |
Matches |
01.1.02 | 11-30-2001 | 2/29/2000 |
Non-Matches |
02/29/01 | 13/01/2002 | 11/00/02 |
Author |
Rating:
Michael Ash
|
Title |
Test
Details
MMM dd, yyyy Date
|
Expression |
^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\ (0?[1-9]|([12]\d)|30))|(Feb(ruary)?\ (0?[1-9]|1\d|2[0-8]|(29(?=,\ ((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\,\ ((1[6-9]|[2-9]\d)\d{2})) |
Description |
This RE validate Dates in the MMM dd, yyyy format from Jan 1, 1600 to Dec 31, 9999. The format is as follows: The name or 3 letter abbreivation, without a period, of the month, then a space then the day value then a comma then a space finally the year. The correct number of day are validated for each month include leap years. The name of month is case sensitive. |
Matches |
Jan 1, 2003 | February 29, 2004 | November 02, 3202 |
Non-Matches |
Feb 29, 2003 | Apr 31, 1978 | jan 33,3333 |
Author |
Rating:
Michael Ash
|
Title |
Test
Details
Pattern Title
|
Expression |
20\d{2}(-|\/)((0[1-9])|(1[0-2]))(-|\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9]) |
Description |
Sql date format tester. |
Matches |
2099-12-31T23:59:59 | 2002/02/09 16:30:00 | 2000-01-01T00:00:00 |
Non-Matches |
2000-13-31T00:00:00 | 2002/02/33 24:00:00 | 2000-01-01 60:00:00 |
Author |
Rating:
Peter Pfeifer
|
Title |
Test
Details
Pattern Title
|
Expression |
(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1} |
Description |
Will match the following date formats: Preceded by a Space, Left-parentheses, or at the beginning of a line. Followed by a Space, Right-parentheses, or Colon(:), word boundary or End of line. Can have / or - as separator. Accepts 2 digit year 00-99 or 4 digit years 1900-2099 (can modify to accept any range) |
Matches |
01/01/2001 | 01-01-2001: | (1-1-01) |
Non-Matches |
13/1/2001 | 1-32-2001 | 1-1-1801 |
Author |
Rating:
David Good
|
Title |
Test
Details
Pattern Title
|
Expression |
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$ |
Description |
dd/MM/yyyy with leap years 100% integrated
Valid years : from 1600 to 9999
As usual, many tests have been made.
I think this one should be fine.
|
Matches |
29/02/2000 | 30/04/2003 | 01/01/2003 |
Non-Matches |
29/02/2001 | 30-04-2003 | 1/1/2003 |
Author |
Rating:
Dany Lauener
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$ |
Description |
Dates
day: d or dd, <= 31,
month: m or mm, <= 12,
year: yy or yyyy >= 1900, <= 2099
|
Matches |
01/01/2001 | 1/1/1999 | 10/20/2080 |
Non-Matches |
13/01/2001 | 1/1/1800 | 10/32/2080 |
Author |
Rating:
Scott Thompson
|
Title |
Test
Details
Pattern Title
|
Expression |
((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2}))) |
Description |
Regex used in .NET to validate a date. Matches the following formats mm/dd/yy, mm/dd/yyyy, mm-dd-yy, mm-dd-yyyy
This covers days with 30 or 31 days but does not handle February, it is allowed 30 days. |
Matches |
1/31/2002 | 04-30-02 | 12-01/2002 |
Non-Matches |
2/31/2002 | 13/0/02 | Jan 1, 2001 |
Author |
Rating:
Sean McAnally
|
Title |
Test
Details
Pattern Title
|
Expression |
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/(\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/(\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/(\d{2}))|(29\/02\/((0[48]|[2468][048]|[13579][26])|(00))))$ |
Description |
Matching : dd/MM/yy
Leap years compatible
Italian style, just for more fun.
Please, don't forget to rate it if you use it. THX
|
Matches |
31/12/75 | 29/02/00 | 29/02/04 |
Non-Matches |
01/13/01 | 29/02/01 | 29/02/2004 |
Author |
Rating:
Not yet rated.
Dany Lauener
|
Title |
Test
Details
Pattern Title
|
Expression |
^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\,*\s\s*\d{4}$|^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\,*\s\d{4}$|^(January|February|March|April|May|June|July|August|September|October|November|December)\,*\s\d{4}$|^(january|february|march|april|may|june|july|august|september|october|november|december)\,*\s\d{4}$ |
Description |
Best Use validation to accept a valid "MonthName(,) Year".
It can validate an entry with or without comma (,).
|
Matches |
January 2004 | Jan, 2004 | january 2003 |
Non-Matches |
Janu 2004 | jAn, 2004 | January,2003 |
Author |
Rating:
Not yet rated.
Elmer Cadelina
|
Title |
Test
Details
dd/mm/yyyy hh:MM:ss Datetime
|
Expression |
(?n:^(?=\d)((?<day>31(?!(.0?[2469]|11))|30(?!.0?2)|29(?(.0?2)(?=.{3,4}(1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|0?[1-9]|1\d|2[0-8])(?<sep>[/.-])(?<month>0?[1-9]|1[012])\2(?<year>(1[6-9]|[2-9]\d)\d{2})(?:(?=\x20\d)\x20|$))?(?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(?i:\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$) |
Description |
DD/MM/YYYY format New DateTime Regex. Rebuilt better than before, better, stronger, faster. This regex will validate a date, time or a datetime. It will also capture the date fields and the time. Dates are in the DD/MM/YYYY format and validated for months, number of days in a month and leap years (29/2) Date field can be separated by matched periods(.), dashes(-) or forward slashes(/). Year range 1600-9999 Time is either 12 hour AM/PM format (HH:mm:ss AM), where minutes and seconds are optional. AM or PM required. or 24 hour military format (HH:mm:SS), from 00:00:00 to 23:59:59, where hours and minutes fields are required, including leading 0 for hours less than 10. Datetime is the above date and time formats separated by a space, with the date first (DD/MM/YYYY HH:mm:SS) !IMPORTANT NOTE: your regex engine must support lookaheads and named groups to use this expression |
Matches |
31/12/2003 | 29/2/2004 4:50 PM | 23:59:59 |
Non-Matches |
12/31/2003 | 29/2/2003 | 4:00 |
Author |
Rating:
Not yet rated.
Michael Ash
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([8]))$|^((([0-7]))$|^((([0-7])).?((25)|(50)|(5)|(75)|(0)|(00))))$ |
Description |
Time off hours edit for quarter hour(s) less than eight. |
Matches |
0.25 | 7.75 | 8 |
Non-Matches |
8.25 | 7.15 | 0.15 |
Author |
Rating:
Not yet rated.
Bob Kranson
|
Title |
Test
Details
Pattern Title
|
Expression |
^((31(?! (FEB|APR|JUN|SEP|NOV)))|(30|29)|(0[1-9])|1\d|2[0-8]) (JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC)$ |
Description |
|
Matches |
09 MAY | 30 FEB | 31 JAN |
Non-Matches |
31 SEP | 09 May |
Author |
Rating:
Not yet rated.
Rohan Pathare
|
Title |
Test
Details
Pattern Title
|
Expression |
^((31(?! (FEB|APR|JUN|SEP|NOV)))|((30|29)(?! FEB))|(29(?= FEB (((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8]) (JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC) ((1[6-9]|[2-9]\d)\d{2})$ |
Description |
Validates date format by DD MMM YYYY. Validates days for each month also.
Ensures that month is uppercase. |
Matches |
09 MAY 1981 | 28 JAN 2004 | 8 JUL 2006 |
Non-Matches |
29 FEB 2003 | 28 Oct 2000 | 9 APR 03 |
Author |
Rating:
Not yet rated.
Rohan Pathare
|
Displaying page
of
pages;
Items to