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

177
Vistas
How to find and extract the time from a multiline string in HH:MM format

I am trying to find a solution to extract the time given in a dynamic string using regex object using JavaScript.

For example - Assume the string to be "Please provide access to the engineer: last name: XYZ first name: ABC date: 02nd November 2021 time window: 11:00AM - 07:00PM CET". I need to extract the time i.e 11:00AM - 07:00PM CET from this.

I tried using the regex expression for time -

/^(0?[1-9]|1[0-2]):([0-5]\d)\s?((?:A|P)\.?M\.?)$/i

and few more other expressions. However whenever I test the returned value is false.

What is the approach to solve this ?

about 4 years ago · Juan Pablo Isaza
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