RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

134 regular expressions found in this category!

Expressions in category: Dates and Times

Change page:   |    Displaying page 7 of 7 pages; Items 121 to 134
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
Title Test Details Pattern Title
Expression
^(\d{1,2})(\s?(H|h)?)(:([0-5]\d))?$
Description
Validates hours and minutes. Allows for entry in the form of hours:minutes with optional minutes and optional hours indicator (H or h).
Matches
1h | 1:45 | 45
Non-Matches
1a | 145 | 1:99
Author Rating: Not yet rated. Andrew Yeaman
Title Test Details Pattern Title
Expression
^(((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])([-./])(\d{4}))|((02)(\.|-|\/)(29)([-./])([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])))$
Description
This works for all accept 01/01/0000 mainly 0000. can anybody suggest a solution.
Matches
01/01/2001
Non-Matches
01/01/00000
Author Rating: Not yet rated. Func toid
Title Test Details Pattern Title
Expression
^\s*(?'num'\d+(\.\d+)?)\s*(?'unit'((w(eek)?)|(wk)|(d(ay)?)|(h(our)?)|(hr))s?)(\s*$)
Description
Validates Microsoft Project-type duration entries. Accepts a number and a unit. The number part can be integer or decimal. The unit can be several variations of weeks, days, and hours: e.g., w, wk, week, ws, wks, weeks are all valid. Whitespace between the number and the unit is optional: e.g., 1d, 2 days, 3.5w are all valid. Captures the number value in a group named num and the unit string in a group named 'unit'.
Matches
1 day | 3.5 w | 6hrs
Non-Matches
1 | 6. days | 1 week 2 d
Author Rating: Not yet rated. Steve Fisher
Title Test Details Pattern Title
Expression
^(([0-9])|([0-1][0-9])|([2][0-3])):?([0-5][0-9])$
Description
For testing 24H based time entry. Tests if there is a colon to separate the hours from the minutes
Matches
0959 | 959 | 9:59
Non-Matches
90 | 960 | 24:00
Author Rating: Not yet rated. mana deys
Title Test Details Pattern Title
Expression
^(([0-9])|([0-1][0-9])|([2][0-3])):(([0-9])|([0-5][0-9]))$
Description
reg. expr. 4 checking 24 time
Matches
1:59 | 01:59 | 23:59
Non-Matches
12:63 | 25:60 | 13.10
Author Rating: Not yet rated. Tomas Andrysek
Title Test Details Pattern Title
Expression
^(?:(?:(?:0?[1-9]|1\d|2[0-8])\/(?:0?[1-9]|1[0-2]))\/(?:(?:1[6-9]|[2-9]\d)\d{2}))$|^(?:(?:(?:31\/0?[13578]|1[02])|(?:(?:29|30)\/(?:0?[1,3-9]|1[0-2])))\/(?:(?:1[6-9]|[2-9]\d)\d{2}))$|^(?:29\/0?2\/(?:(?:(?:1[6-9]|[2-9]\d)(?:0[48]|[2468][048]|[13579][26]))))$
Description
This expression validates dates in the Brazilian d/m/y format from 1/1/1600 - 12/31/9999. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999. Days and months must be 1 or 2 digits and may have leading zeros. Years must be 4 digit years, between 1600 and 9999. Date separator must be a slash (/)
Matches
29/02/2004 | 15/3/1824 | 31/01/2001
Non-Matches
29/02/2000 | 21/10/92 | 31/02/2001
Author Rating: Not yet rated. Felipe Braga
Title Test Details Pattern Title
Expression
^\d{2}\s{1}(Jan|Feb|Mar|Apr|May|Jun|Jul|Apr|Sep|Oct|Nov|Dec)\s{1}\d{4}$
Description
valid date base on Month
Matches
01 Jan 2003
Non-Matches
01 01 2003
Author Rating: Not yet rated. stephen lam
Title Test Details Pattern Title
Expression
^[\w-\.]+@([\w-]+\.)+[\w-]{2,3}$
Description
For Date format MM-JJ-YYYY validation
Matches
umtsfr@free.fr | 123@dz.com | regexlib@regexlib.fr
Non-Matches
umtsfr@free | umtsfrfree.fr | @free.fr
Author Rating: Not yet rated. Hakim SALHI
Title Test Details Pattern Title
Expression
^(([0]?[1-9]|1[0-2])/([0-2]?[0-9]|3[0-1])/[1-2]\d{3})? ?((([0-1]?\d)|(2[0-3])):[0-5]\d)?(:[0-5]\d)? ?(AM|am|PM|pm)?$
Description
Matches variations on date/time/AM-PM. Must have 4 digit year, but everything else is open. Restrictions are: 4 digit year, months 1-12, hours 1-23, minutes and seconds 1-59, any case of AM and PM. If this don't woik, I wrote it, lemmy know.
Matches
12/30/2002 | 12/30/2002 9:35 pm | 12/30/2002 19:35:02
Non-Matches
18/22/2003 | 8/12/99 | 8/22/2003 25:00
Author Rating: Not yet rated. Michael Gaertner
Title Test Details Pattern Title
Expression
^(3[0-1]|2[0-9]|1[0-9]|0[1-9])[\s{1}|\/|-](Jan|JAN|Feb|FEB|Mar|MAR|Apr|APR|May|MAY|Jun|JUN|Jul|JUL|Aug|AUG|Sep|SEP|Oct|OCT|Nov|NOV|Dec|DEC)[\s{1}|\/|-]\d{4}$
Description
More flexible date validator. Allows either spaces, / or - as dividers, also allows for fully uppercase months, year as 4 digit.
Matches
01 JAN 2003 | 31/Dec/2002 | 20-Apr-2003
Non-Matches
32 Jan 2003 | 00 Dec 2003 | 10 dec 2003
Author Rating: Not yet rated. Ian Wallace
Title Test Details Days of the week
Expression
^(Sun|Mon|(T(ues|hurs))|Fri)(day|\.)?$|Wed(\.|nesday)?$|Sat(\.|urday)?$|T((ue?)|(hu?r?))\.?$
Description
This RE matches Days of the week or their abbreviations.
Matches
Sunday | Mon | Tu
Non-Matches
day | Wedday | Payday
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(\d{4}))|((29)(\.|-|\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))
Description
Date in DD/MM/YYYY format. Fecha en formato DD/MM/AAAA.
Matches
28/12/2003 | 28/02/2003 | 29/02/2000
Non-Matches
28-02-2003 | 30/02/2003 | 28.02.2003
Author Rating: Not yet rated. Mathews Inga
Title Test Details Pattern Title
Expression
^((((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9]))))[\-\/\s]?\d{2}(([02468][048])|([13579][26])))|(((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))[\-\/\s]?\d{2}(([02468][1235679])|([13579][01345789]))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$
Description
This regex will match SQL Server datetime values, allowing date only, allowing zero padded digits in month, day and hour, and will match leap years from 1901 up until 2099.
Matches
2/29/2004 | 04/01/2003 10:01:23 am | 03-20-1999
Non-Matches
2/29/2003 | 13/30/2001 10:05:00 pm | 12/32/2003
Author Rating: Not yet rated. Sung Lee
Change page:   |    Displaying page 7 of 7 pages; Items 121 to 134

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