Basic Information
Caption: Credit Card - UnionPay
Description: This classifier identifies UnionPay credit card numbers using a regular expression, relevant nearby terms and LUHN validation . It accommodates both hyphen-separated formats and non-delimited formats, ensuring coverage of all common variations.
Type: By content
Value Per Record: $100
Sensitive: Yes
Active: Yes
Regulations
- PCI
- FTC
Conditions
- Matches regex: (((?:^|[^-+.,'\"#;:\w])((622)(\d{13}|\d{16}))(?![-+.'\"#;:\w]))|((?:^|[^-+.,'\"#;:\w])622\d{1}(\-\d{4}){3}(?:\-\d{3})?)(?![-+.'\"#;:\w]))
- Nearby Words: "UnionPay, credit, CCN, CRV, CCV, Exp"
- Validation Method: LUHN
Regular Expression Description
This regex detects a 16-digit or 19 digit numbers starting with 622, followed by 13 or 16 numeric digits (0–9). It can be non-delimited 16-digit or a hyphenated format (e.g., 6221-2345-6789-1234). To reduce false positives, the rule also requires the presence of nearby terms such as "credit," "CCN," "CRV," "CCV," or "Exp." and LUHN validation.
To check if a string matches this regular expression, use Regex101.