Extracting Urls From Text

RoughOutline

New member
Aug 29, 2011
273
6
0
Does anyone know of a site or tool that allows you to extract urls from text and turn them into this...

URL 1
URL 2
URL 3

...so each URL is on a separate line?

Cheers,
Matt
 


If you are a visual basic programmer I have some code to extract URLs from text to a listbox, PM me if that would help you.
 
Does anyone know of a site or tool that allows you to extract urls from text and turn them into this...

URL 1
URL 2
URL 3

...so each URL is on a separate line?

Cheers,
Matt

Mmmm if it was HTML, I'd say Beautiful Soup.
Regex for text.
 
Code:
import re
data = open('input.txt').read()
results = re.compile('''(https?://[^\s"<>'+]+)''').findall(data)
open('output.txt','w').write('\n'.join(results))

Will actually process it. You need python 2.7 from python.org

No help with this is being offered, don't PM me guys.
 
Reaaaaally long way of doing it, but I use to copy all into a text file, save as HTML, open In firefox and use link golpher (I think, a link extractor anyway) and that did it for me.