Title |
Test
Find
CVV2/CVC2/CID
|
Expression |
^(?!000)\d{3,4}$ |
Description |
This is a bit shorter than the first CVV2/CVC2/CID regex found on the site. It matches any 3 or 4 character number.
Now featuring change per suggestion in comments. Thanks! |
Matches |
123 | 1234 |
Non-Matches |
1 | 12 | 12345 |
Author |
Rating:
Tony Fugere
|
Source |
|
Your Rating |
|
Title: will match mis-formed entries
Name: Cory Hubbert
Date: 8/8/2011 11:59:55 AM
Comment:
1a223 will match 1223, may want ^(?!000)\d{3,4}$ which will not match this.
Title: 000 and 0000 are valid CVV2 numbers
Name: Ian Lotinsky
Date: 11/19/2009 10:55:38 AM
Comment:
We just ran into 000 and 0000 CVV2s yesterday. Can you reference your source @osizzle? Thanks.
Title: CVV2/CVC2/CID
Name: osizzle
Date: 9/28/2007 4:39:36 PM
Comment:
You can add the following and it will stop people from putting in 000 or 0000 which are invalid codes:
(?!000)\d{3,4}$