Regular Expression

\b(4[0-9]{12}(?:[0-9]{3})?)\b

Details

Visa card numbers start with a "4" and are either 13 or 16 digits long

Tags: creditcard, ecommerce