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-9]{6}[\s\-]{1}[0-9]{12}|[0-9]{18})$
Description
This regular expression matches 'Switch' card numbers - a payment method used extensively in the UK.
Matches
000000 000000000000 | 000000-000000000000 | 000000000000000000
Non-Matches
000000_000000000000
Author Rating: Not yet rated. Scott Frampton
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: wrong method
Name: brt4ce
Date: 10/17/2011 4:21:27 AM
Comment:
There is a method to check card number but its not a regex ...


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