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

224
Vistas
Extract href by regex

could you help out , i am am receiving an email and trying to extract the link from the text so that the match would be [https://development-client.test.app/users/reset-password?email=test.test%40inbox.testmail.app&code=98f192b1-5673-45b5-b498-d55a4ba3345]

I need to ignore the brackets and stop once code= value ends

This would match all the way including the bracket https:\/\/[^\s]+

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

0

Use

\[([^\]]+)\]

to find your match in capture group #1.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Not sure if this is your intention, if I understood you correctly then this option would work for matching any text in between a starting "[" and a closing "]":

const text =
  '[https://development-client.test.app/users/reset-password?email=test.test%40inbox.testmail.app&code=98f192b1-5673-45b5-b498-d55a4ba3345]';

console.log(text.match(/(?<=^\[).*(?=\]$)/)[0]);
// https://development-client.test.app/users/reset-password?email=test.test%40inbox.testmail.app&code=98f192b1-5673-45b5-b498-d55a4ba3345
about 4 years ago · Juan Pablo Isaza Denunciar

0

You should exclude the closing (escaped) bracket together with the whitespaces:

https:\/\/[^\s^\]]+

You can check it here.

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