Skip to main content
Regexflux

American Express Number

beginner

Matches Amex card numbers (starts with 34 or 37, 15 digits).

credit-cardamexpaymentvalidation

Pattern

/3[47]\d{2}[\s-]?\d{6}[\s-]?\d{5}/g

Try It

0 of 6 strings matched

Explanation

Matches American Express card numbers starting with 34 or 37, with 15 total digits in 4-6-5 grouping pattern.

Test Strings

Matching

  • 371449635398431
  • 3714 496353 98431
  • 3400-000000-00009

Non-matching

  • 4111111111111111
  • 3812345678901234
  • 37144963539843

Language Compatibility

LanguageSupport
JSFull support
PYTHONFull support
JAVAFull support
PHPFull support
GOFull support

Code Snippets

const regex = /3[47]\d{2}[\s-]?\d{6}[\s-]?\d{5}/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);

Related Patterns