Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

82
Vistas
Regex for Mastercard Card Number Range

I could use some help developing a regex for the following range:

222100‑272099

This is what I have so far, but I am having trouble figuring out how to make it work for the entire range. I get caught up on the 3rd and 4th digit.

^2[2-7][0-9][0-9][0-9][0-9]

This is a part of this

var optCC = '2221000000000000';

if(optCC.match(/^2[2-7][0-9][0-9][0-9][0-9]/)){
//do stuff
}

Basically I am trying to detect if someone is using a legacy Mastercard credit card number and this is the range I've found through my searching.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda