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

188
Vistas
I need a Regex that does not match when it is not valid

What is needed is to validate from a given string, if the user when typing his password has repeated any of the valid characters more than twice and in the case that he has not done so, the password should not be matched because it is not valid.

I have tried with this

(?!.*([a-zA-Z0-9@._\-\/,])\1{2})

and this

(?!([a-zA-Z0-9@._\-\/,])\1{2})
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This regex will try to match the entire string, start to finish, without any character repeating 3 times (immediately after each other):

^((?!([a-zA-Z0-9@._\-\/,])\2{2}).)*$

https://regex101.com/r/ci8hMK/1

If a character is not allowed to appear more than 2 times in total:

^((?!([a-zA-Z0-9@._\-\/,]).*\2.*\2).)*$

https://regex101.com/r/9DuJqJ/1

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