- Sleeping Sheep Hackers… - http://sleepingsheephackers.org -

Some Regex that might come useful

Dieser Eintrag stammt von matti Am 10.10.2009 @ 22:14 In general | Keine Kommentare

Looking on a system for some credit cards?
Maybe some grep action can help with this…

Visa: ^4[0-9]{12}(?:[0-9]{3})?$
Starting with 4 and either 13 digits (old cards) or 16 (new ones)

MasterCard: ^5[1-5][0-9]{14}$
Starting with 51, 52, .. 55. 16 digits.

American Express: ^3[47][0-9]{13}$
Starting with 34 or 37 15 digits.


Dieser Artikel wurde ausgedruckt ab Sleeping Sheep Hackers…: http://sleepingsheephackers.org

URL zum Artikel: http://sleepingsheephackers.org/2009/10/10/some-regex-that-might-come-useful/

Klicken hier zum Drucken.