Skip to content

Instantly share code, notes, and snippets.

@artero
Forked from trico/gist:1050747
Created August 1, 2011 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artero/1118001 to your computer and use it in GitHub Desktop.
Save artero/1118001 to your computer and use it in GitHub Desktop.
Extraer todas las urls de una cadena
var re = /http([^"'\s]+)/g,
text = 'href="%interes%&i=SoyUnInteres&u=http://google.es/?%moglaA2%20 texto sobre el texto de textos a mas textos %Q /ht href="%interes%&i=OtroInteres&u=http://popplers.com"',
encontrados = text.match(re);
console.log(encontrados);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment