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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find MM/YYYY MONTH/YEAR
Expression
^((0[1-9])|(1[0-2]))\/(\d{4})$
Description
This regular expressions matches dates in the format MM/YYYY where MM can be 01 to 12 and YYYY is always 4 digits long.
Matches
12/2002 | 11/1900 | 02/1977
Non-Matches
1/1977 | 00/000 | 15/2002
Author Rating: The rating for this expression. Jony Ferreira
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: thanks
Name: MVV
Date: 9/10/2021 8:03:19 PM
Comment:
Thanks


Title: Single- or double-digit month with 19xx or 20xx year
Name: Baller
Date: 9/19/2017 6:01:03 AM
Comment:
m/yyyy or mm/yyyy where yyyy has to start with '19' or '20' Here you go, fam: ^((0?[1-9])|(1[0-2]))\/(19|20)\d{2}$


Title: 29-Apr-16
Name: Rosanne
Date: 6/23/2016 3:52:45 PM
Comment:
What is the dictionary to change above format to 4/26/2016 please help!!


Title: 29-Apr-16
Name: Rosanne
Date: 6/23/2016 3:52:38 PM
Comment:
What is the dictionary to change above format to 4/26/2016 please help!!


Title: 29-Apr-16
Name: Rosanne
Date: 6/23/2016 3:38:16 PM
Comment:
What is the dictionary to change above format to 4/26/2016 please help!!


Title: M/yyyy AND MM/yyyy format
Name: Sandeep
Date: 8/5/2009 7:40:45 AM
Comment:
^([1-9]|1[0-2]|0[1-9])\/(\d{4})$


Title: M/yyyy AND MM/yyyy format
Name: Sandeep
Date: 8/5/2009 7:40:23 AM
Comment:
^([1-9]|1[0-2]|0[1-9])\/(\d{4})$


Title: M/yyyy format
Name: Sandeep
Date: 8/5/2009 7:31:14 AM
Comment:
What if you wanted to allow a month in the form of a single digit (m/yyyy) as well as the mm/yyyy format (01/2003 and 1/2003)?


Title: Single Month
Name: Andy Spencer
Date: 12/10/2003 12:09:26 PM
Comment:
What if you wanted to allow a month in the form of a single digit (m/yyyy) as well as the mm/yyyy format (01/2003 and 1/2003)?


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