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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([6011]{4})([0-9]{12})$
Description
Validate against any discover card number. All DC's start with 6011 and are followed by 12 other numbers.
Matches
6011212541254121 | 6011523654125685
Non-Matches
5021152365212541 | 601126523652321 | 60112563212563215
Author Rating: Not yet rated. Jeff Johns
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: Beware: faulty RegEx!
Name: Andrew H
Date: 8/12/2010 5:24:38 AM
Comment:
This will also match numbers starting 6101, 1111, etc. because first statement is invalid. Would be better as ^6011([0-9]{12})$


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