Skip to content

Instantly share code, notes, and snippets.

@vgoklani
Created October 27, 2011 14:55
Show Gist options
  • Save vgoklani/1319769 to your computer and use it in GitHub Desktop.
Save vgoklani/1319769 to your computer and use it in GitHub Desktop.
regex for extracting urls
import re
urls = re.findall(r'href=[\'"]?([^\'" >]+)', s)
print ', '.join(urls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment