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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Date With Slashes
Expression
^\d{1,2}\/\d{1,2}\/\d{4}$
Description
This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long and YYYY is always 4 digits long.
Matches
4/1/2001 | 12/12/2001 | 55/5/3434
Non-Matches
1/1/01 | 12 Jan 01 | 1-1-2001
Author Rating: The rating for this expression. Steven Smith
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: ^(\D(?<![\\/@$ ])){2,}( (\D(?<![\\/@$ ]))+|)*$
Name: please explain
Date: 3/4/2021 8:34:44 AM
Comment:
Hello , can you help with this regular expression


Title: ^(\D(?<![\\/@$ ])){2,}( (\D(?<![\\/@$ ]))+|)*$
Name: please explain
Date: 3/4/2021 8:34:28 AM
Comment:
Hello , can you help with this regular expression


Title: /^\d*(?:\.\d{1,2})?$/
Name: explain plz
Date: 4/4/2020 5:02:35 PM
Comment:
hi


Title: Regex urgent
Name: Upendra
Date: 2/13/2018 9:54:19 AM
Comment:
a.match(/(\d{1,2})\/(\d{1,2})\/(\d{2,4})( (\d{1,2}):(\d{1,2}))? ?(am|pm|AM|PM|Am|Pm)?/) how to get second value as well. Input: <span>1/8/2018 9:45:30 AM</span>


Title: Working Date REGEX with Slashes for MM/DD/YYYY
Name: Jéssie Marx
Date: 12/4/2017 10:49:36 AM
Comment:
I write a regEx and I tested and it works well ^(1[0-2]|0[1-9]|[1-9])\/(1[0-9]|2[0-9]|3[0-1]|0[1-9]|[1-9])\/\d{4}$ I hope you find it useful! test yourself if any outmatches there let me know... Thank you


Title: Working Date REGEX with Slashes for MM/DD/YYYY
Name: Jéssie Marx
Date: 12/4/2017 10:35:20 AM
Comment:
I write a regEx and I tested and it works well ^(1[0-2]|0[1-9]|[1-9])\/(1[0-9]|2[0-9]|3[0-1]|0[1-9]|[1-9])\/\d{4}$ I hope you find it useful! test yourself if any outmatches there let me know... Thank you


Title: False regex to match a exact date in the format of MM/DD/YYYY
Name: Jéssie Marx
Date: 12/4/2017 10:07:05 AM
Comment:
A date should be 12 months and maximum 31 days... This one match a date like 99/99/9999. Pls. correct with a right one. Thank you


Title: test
Name: test
Date: 8/2/2017 1:40:49 AM
Comment:
\\\d{2,3}


Title: test
Name: test
Date: 8/2/2017 1:40:32 AM
Comment:
\\\d{2,3}


Title: test
Name: test
Date: 4/23/2017 2:29:57 PM
Comment:
^\d{1,2}\/\d{1,2}\/\d{4}$


Title: "^\$(?:0|[1-9]\d{0,2}(?:,?\d{3})*)(?:\.\d+)?$"
Name: ^\$(?:0|[1-9]\d{0,2}(?:,?\d{3})*)(?:\.\d+)?$
Date: 3/25/2016 2:23:25 PM
Comment:
"^\$(?:0|[1-9]\d{0,2}(?:,?\d{3})*)(?:\.\d+)?$" what is this


Title: Scorpion
Name: Ozdecan
Date: 4/15/2013 3:24:23 PM
Comment:
Very good


Title: Lord
Name: Jasper Irving
Date: 3/1/2010 5:04:54 AM
Comment:
Waht the fuck, blood, i'll shank yer.


Title: Lord
Name: Jasper Irving
Date: 3/1/2010 5:03:57 AM
Comment:
Waht the fuck, blood, i'll shank yer.


Title: Lord
Name: Jasper Irving
Date: 3/1/2010 5:03:37 AM
Comment:
Waht the fuck, blood, i'll shank yer.


Title: WTF Jasper?
Name: Mat
Date: 2/2/2010 3:50:11 PM
Comment:
Dude, why are you so angry, and who is Arlene Philips?


Title: WTF Jasper?
Name: Mat
Date: 2/2/2010 3:43:07 PM
Comment:
Dude, why are you so angry, and who is Arlene Philips?


Title: WTF Jasper?
Name: Mat
Date: 2/2/2010 3:27:53 PM
Comment:
Dude, why are you so angry, and who is Arlene Philips?


Title: WTF Jasper?
Name: Mat
Date: 2/2/2010 3:27:42 PM
Comment:
Dude, why are you so angry, and who is Arlene Philips?


Title: WTF Jasper?
Name: Mat
Date: 2/2/2010 3:27:30 PM
Comment:
Dude, why are you so angry, and who is Arlene Philips?


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:24:29 AM
Comment:
I AM ARLENE PHILLIPS!!!!!


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:21:50 AM
Comment:
I'll stab you, blood, you little jew eating cunt.


Title: ME...
Name: 123
Date: 1/21/2010 9:21:21 AM
Comment:
NO


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:19:38 AM
Comment:
I'll stab you, blood, you little jew eating cunt.


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:19:16 AM
Comment:
I'll stab you, blood, you little jew eating cunt.


Title: ME...
Name: 123
Date: 1/21/2010 9:17:25 AM
Comment:
hello, Jasper Irving


Title: ME...
Name: 123
Date: 1/21/2010 9:17:24 AM
Comment:
hello, Jasper Irving


Title: ME...
Name: 123
Date: 1/21/2010 9:17:24 AM
Comment:
hello, Jasper Irving


Title: ME...
Name: 123
Date: 1/21/2010 9:17:14 AM
Comment:
hello, Jasper Irving


Title: ME...
Name: 123
Date: 1/21/2010 9:17:05 AM
Comment:
hello, Jasper Irving


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:10:22 AM
Comment:
THIS IS DA SOUND OF DA POLICE WOOP WOOP


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:08:23 AM
Comment:
THIS IS DA SOUND OF DA POLICE WOOP WOOP


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 9:05:12 AM
Comment:
THIS IS DA SOUND OF DA POLICE WOOP WOOP


Title: Lord
Name: Jasper Irving
Date: 1/21/2010 8:57:24 AM
Comment:
THIS IS DA SOUND OF DA POLICE WOOP WOOP


Title: As complete as I can be bothered with
Name: Josephine
Date: 6/12/2008 10:50:39 AM
Comment:
The only thing this doesn't cover is 29th feb on a non-leap year... ((0[1-9]|[12][0-9]|30)[/](0[469]|11])|( 0[1-9]|[12][0-9])[/](02)|( 0[1-9]|[12][0-9]|3 [01])[/](0[13578]|10|12]))[/](19|20)[0-9]{2}


Title: This one is better
Name: Cael
Date: 11/24/2007 7:59:50 PM
Comment:
This one is better, includes /.- separators. Format dd-mm-yyyy: /(0?[1-9]|[12][0-9]|3[01])[- \/\.](0?[1-9]|1[012])[- \/\.]((19|20)?\d\d)/


Title: Lame
Name: Stephen Jones
Date: 6/30/2006 10:59:41 AM
Comment:
Wasn't aware 99/99/9999 was a date.


Title: Corrected
Name: Sandy
Date: 11/13/2003 10:57:54 AM
Comment:
Correctly matches pattern attempted by MLP. Matches pattern DD/MM/YYYY. ^([1-9]|(0[1-9])|([1-2][0-9])|3[0-1])\/([1-9]|(0[1-9])|(1[0-2]))\/[0-9]{4}$


Title: Better
Name: MLP
Date: 8/29/2003 12:18:36 AM
Comment:
This is a little better but not perfect :-) ^([1-9]|(0[1-9])|([1-2][0-9])|3[0-1])\/((0[1-9])|(1[0-2]))\/[0-9]{1,4}$


Title: Incorrect matching
Name: steve
Date: 7/30/2003 10:41:16 AM
Comment:
INCORRECTLY VALIDATES 12/55/2003


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