Test, validate and match regular expressions
This regex validates credit card numbers for major brands: Visa (starting with 4), Mastercard (ranges 2221-2720 and 51-55), American Express (34 or 37), and Discover (6011 or 65). It matches full numbers with optional spaces/hyphens omitted, using anchors and multiline flag to find numbers in text. Use cases include form validation, data extraction, and fraud detection.