Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda