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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^((0[1-9])|(1[0-2]))\/(\d{2})$
Description
Validates MM/YY for rough checking credit card expiration dates.
Matches
11/03 | 01/04
Non-Matches
13/03 | 10/2003
Author Rating: The rating for this expression. Kevin Coleman
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: Mr.
Name: John Eisbrener
Date: 2/24/2005 11:53:28 AM
Comment:
I took the basic expression above and added functionality for MM/YYYY MM/YY MMYYYY MMYY ^((0[1-9])|(1[0-2]))(\/){0,1}((\d{2})|(\d{4}))$ It's just a little more extensive. Nothing fancy.


Title: [email protected]
Name: JoAn
Date: 9/30/2004 11:21:04 AM
Comment:
How can I find out how to use the expression? I don't know how to apply it to my code. [email protected] // JoAn


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