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

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 15 regular expressions found.

   Displaying page 1 of 1 pages; Items 1 to 15
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: The rating for this expression. Spring Zhang
Title Test Details Validate 12hour clock
Expression
(?<Time>^(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d(?:[ap]m)?)
Description
A co-worker needed a regex to validate time. He could only find patterns that match a 24hour clock. I whipped this expression up to validate a 12hour clock. Hope somebody finds it useful.
Matches
12:00am | 01:30pm | 4:59
Non-Matches
15:30 | 4:78am | 00:00
Author Rating: The rating for this expression. Ariel Merrell
Title Test Details Pattern Title
Expression
^([1-9]|1[0-2]|0[1-9]){1}(:[0-5][0-9][aApP][mM]){1}$
Description
Very simple expression to validate time on a 12 hour clock, this expression is valid for client-side script validations (RegularExpressionValidator - ASP.NET).
Matches
08:00AM | 10:00am | 7:00pm
Non-Matches
13:00pm | 12:65am
Author Rating: The rating for this expression. Roberto Hernández
Title Test Details MySQL Date Format
Expression
^(\d{4})-((0[1-9])|(1[0-2]))-(0[1-9]|[12][0-9]|3[01])$
Description
For MySQL Date Time Format
Matches
2007-12-31
Non-Matches
3450-13-32
Author Rating: Not yet rated. xaxdrax
Title Test Details Validate Time Format (Railway Time 24 hrs)
Expression
\b(0[0-9]|1[0-9]|2[0-3])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\b
Description
It will matches the railway time format that 00:00:00 to 23:59:59
Matches
00:00:00 | 23:59:59 | 10:00:00
Non-Matches
24:0:00 | 20:60:60 | 15:00
Author Rating: Not yet rated. Ajesh Kumar CM
Title Test Details Validate Time format (Standard time 12 hrs)
Expression
\b(0[0-9]|1[0-1])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\b
Description
It will matches the Standard time format that 00:00:00 to 11:59:59
Matches
00:00:00 | 11:59:59 | 10:00:00
Non-Matches
20:00:00 | 10:60:60 | 15:00
Author Rating: Not yet rated. Ajesh Kumar CM
Title Test Details Validate Time format with AM,PM (Standard time 12 hrs)
Expression
\b(0[0-9]|1[0-1])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\s*(AM|PM|A|P)\b
Description
It will matches the Standard time format that 00:00:00 AM to 11:59:59 PM
Matches
00:00:00 AM | 11:59:59 PM | 10:00:00 AM
Non-Matches
00:00:00 | 11:59:59 | 15:00 PM
Author Rating: Not yet rated. Ajesh Kumar CM
Title Test Details time
Expression
^((1[01])|(\d)):[0-5]\d(:[0-5]\d)?\s?([apAP][Mm])?$
Description
validate time in hh:mm:ss hh:mm hh:mm:ss pm(am,PM,AM) <12h
Matches
11:23:43PM | 3:25:35 | 1:23 am
Non-Matches
12:01:01 | 3.14pm | 01:24AM
Author Rating: Not yet rated. daniel cai
Title Test Details mm/dd/yyyy hh:mm:ss Date Time
Expression
^(0[1-9]|1[012])[/](0[1-9]|[12][0-9]|3[01])[/][0-9]{4}(\s((0[1-9]|1[012])\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|]{2,2})))?$
Description
I got a regex for date time from here, which had some bugs. so i referred a few regex from this site and created a regex which i tested and didnt find any errors. I will check again and update if required.
Matches
12/24/2004 12:42:25 AM, 12/24/2004(without time)
Non-Matches
12-24-2004 12:42:24 AM, 12/24/2004 12:42:24 am
Author Rating: The rating for this expression. anil kumar b
Title Test Details DateTime
Expression
^([0]\d|[1][0-2]\/([0-2]\d|[3][0-1])\/([2][0]\d{2})\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)?\s(AM|am|aM|Am|PM|pm|pM|Pm)
Description
Date Time with am/pm.
Matches
10/13/2008 12:00:00 AM, 10/13/2008 12:00:00 PM
Non-Matches
10/13/2008 12:00:00
Author Rating: The rating for this expression. Yaron
Title Test Details Time 24:00 hrs format
Expression
^(([01][0-9]|[012][0-3]):([0-5][0-9]))*$
Description
The Regular Expression to validate time format in [24:00] hrs. >> Pemitted values from 00:00 to 23:59 >> Prefix zero for single digit hours 01:00 to 09:59 >> Tested & Certified by Mr. Shripad Pramod Bhende :-)
Matches
01:00 , 23:59
Non-Matches
2:00, 2:2, 02-30
Author Rating: The rating for this expression. VenkatRaj
Title Test Details Validate Time
Expression
^ *([0-1]?[0-9]|[2][0-3]):[0-5][0-9] *(a|p|A|P)(m|M) *$
Description
Validates time that's formatted by the ajax MaskedEditEditor (typically in 00:00 AM/PM). Validates 12/24 hour times.
Matches
11:15 PM, 23:15 PM
Non-Matches
28:00 PM, 01:99 AM
Author Rating: Not yet rated. Andrew Tatum
Title Test Details Date Time Group (DTG)
Expression
^(3[0-1]|2[0-9]|1[0-9]|0[1-9])(0[0-9]|1[0-9]|2[0-3])([0-5][0-9])\sUTC\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s[0-9]{2}$
Description
In military messages and communications (e.g. on naval charts, or maps showing troop movements) the format is DDHHMMZ Mon YY, so for instance, "271545Z FEB 08" represents 15:45 Zulu time (which is to say UTC) on the 27th of February, 2008. For Radio Navigational Warnings (RNWs), the international format is slightly different, using the explicit UTC text instead of the Zulu character, becoming "DDhhmm UTC Jun YY". E.g. "240923 UTC Jun 10" is "9:23am on 24th June 2010".
Matches
312359 UTC Jun 99
Non-Matches
322567 UTC June 1999
Author Rating: Not yet rated. Ben McInerney
Title Test Details Date time Expression
Expression
((\(\d{2}\) ?)|(\d{2}/))?\d{2}/\d{4} ([0-2][0-9]\:[0-6][0-9])
Description
Regular expression for find date with time.
Matches
dd/mm/yyyy HH:MM format, 10/10/2010 05:30
Non-Matches
dd/mm/yy HH:MM
Author Rating: The rating for this expression. faiz shaikh
Title Test Details Validate Traditional Time Formats
Expression
^(1[0-2]|0?[1-9]):([0-5]?[0-9])( AM| PM)$
Description
You want to validate times in various traditional time formats, such as hh:mm tt 12-hour formats.
Matches
12:45 AM|2:30 PM
Non-Matches
12:45AM|2:30PM
Author Rating: Not yet rated. Bheemsen Singh
   Displaying page 1 of 1 pages; Items 1 to 15

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