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

108
Vistas
regex to match if string has ev or pp using javascript

I need regex to match a condition like below:

if ev or pp is in the begining of string and has any number after that,then it should match

For example:

if string is ev100 then it will satisify the condition so it should print ev100.

if string is pp44 then print pp44.

if string is ep39 then it will not satisfy the condition. Hence it should not be printed

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

0

You may use match here with the regex pattern ^(?:ev|pp)\d+:

var inputs = ["ev100", "pp44", "ep39"];
inputs.forEach(x => x.match(/^(?:ev|pp)\d+/) ? console.log(x) : "");

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