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

136
Vistas
Get a list of URLs from large document

I am trying to get a list of URLs "https://www.crocodiletrading.co.uk/" from an HTM file, I also need to get anything that comes after the main URL for example /blog/name-of-blog etc.

I am using Notepad++ and Regex to try and accomplish this but I am struggling. I don't really understand Regex.

I've tried something like this: .*?(https\:\/\/www\.[a-zA-Z0-9\.\/\-]+)

Can anyone let me know how I can accomplish this?

I'm getting a list of the URLs that have been flagged as broken so I can then use this to set up 301 redirects.

Here is the HTML FILE if anyone wants to take a look.

Thanks in advance.

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

0

Here is what I ended up doing instead, using good old jQuery to grab the URLs that contained crocodiletrading.co.uk

jQuery( document ).ready( function() { 
var arr = [];
i = 0;

jQuery('a[href*="crocodiletrading.co.uk"]').each(function() {
    arr[i++] = jQuery(this).attr('href');
});

var list = '<ul class="myList"><li class="ui-menu-item" role="menuitem"><a class="ui-all" tabindex="-1">' + arr.join('</a></li><li>') + '</li></ul>';
console.log(list);
  });
about 4 years ago · Juan Pablo Isaza Denunciar

0

This function prints all the links that are inside all anchor tags (<a href="link to some page"></a>)

const getAllLinks = () => {
    const links = document.querySelectorAll("a");
    links.forEach(link => {
        console.log(link.href);
    })
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

Try this code it may be helpful ,

Find: ^[\s\S]+?(https://www.crocodiletrading.co.uk/).*\n*(blog.*\d+).*

Replace All: $1$2

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