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

104
Vistas
Is there a way to add the ']' special character in my regex, when it normally ends my proposition?

I am trying to fit ']' into my regex that lets any string pass as long as it doesn't have a certain set of special characters. However, the IDE shows me that it ends the expression:

message: Joi.string().regex(/^[^<>#*=+^}[]+$/).required()
//current working code


message: Joi.string().regex(/^[^<>#*=+^}[]]+$/).required()
//what I am trying to add
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You can escape special character using \

So you can use: (/^[^<>#*=+^}[\]]+$/) which will escape the first ] allowing it to be viewed as a regular symbol.

If you are new to regular expressions, try regex101.com. It does a good job of breaking them down for you.

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