/
(?# This regex was created for the purposes of detecting potentially compromised credentials for the purposes of information security and not to be used for malicious purposes.)
(?<!\d)
(?# s - Short [less than 16 digits], m - Medium [16 digits], l - Long [more than 16 digits; not yet implemented])
(?# First four digits)
(?:
(?# Standard 16 digit numbers)
(?<m>
(?#MasterCard between 222100-272099)
222[1-9]|223\d|2[3-6]\d{2}|27[01]\d|2720|
(?#JCB is between 3528-3589)
352[89]|35[3-8]\d|
(?#Visa, MasterCard, Discover)
[4-6]\d{3}