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

135
Vistas
Regular expressions in Javascript with limiting amount of numbers/letters

I am trying to figure out how to write regular expressions in javascript i need to have a three letter group of either ACF, ABQ, or BXD the character after must be hyphen followed by either 6 or 9 then 5 numbers between 0-9

This is my attempt i'm not sure where I am going wrong?

/ACF|ABQ|BXD-^6|9[0-9]{5}

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can group the first 3 alternations in a non capture group, and you should put the ^ at the start of the pattern.

If you want to match 6 or 9 you can use a character class [69]

The $ at the end denotes the end of the string.

The pattern can be written as:

^(?:ACF|ABQ|BXD)-[69][0-9]{5}$

Regex demo

about 4 years ago · Juan Pablo Isaza Denunciar
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