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

189
Vistas
How to match two or more words name in javascript regex?

I'm trying to verify that there are at least two words name, where a word is only alphabet for example:

// Should pass
Jean Acker 
Mary Kay Adams
Elizabeth Allen Alba Bailey
Blanche Baker Bowen Collinge Marie
// ...and so on more than two words

// Should Fail
Ryan
Filbert77
Mark 21
Franz.Dimaz

This is the regex I'm currently using just to verify letters and spaces

/^[aA-zZ\s]+$/

I have searched and tried one of them on this link but it didn't work link

Can anyone help me to verify name more than 1 word?

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

try this:

([a-zA-Z]{1,})+\s+([a-zA-Z]{1,})+[a-zA-Z\s]*

about 4 years ago · Santiago Trujillo Denunciar

0

Demo: https://regex101.com/r/tt4H3Q/1

Pattern : [a-zA-Z]+(?: [a-zA-Z]+)+

[a-zA-Z] -> Match only alphabets

+ -> Match the pattern one or more times

about 4 years ago · Santiago Trujillo 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