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

187
Vistas
Regular Expression: Opposite of specific length of numbers

According to the title. I'm looking for a regular expression to match the unspecified length of numbers (any length except 10).

It no't work:

(?!\d{10}$)

Best Regards.

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

0

Currently your pattern is an unanchored negative lookahead assertion that fires at every position.

What you can do is anchor it at the start of the string, and match the digits until the end of the string:

^(?!\d{10}$)\d+$

See a regex demo.

Or alternatively match either 1-9 or 11 or more digits

^(?:\d{1,9}|\d{11,})$
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