find allurl in text python

Solutions on MaxInterview for find allurl in text python by the best coders in the world

showing results for - "find allurl in text python"
Julian
03 Aug 2018
1import re
2text = '<p>Contents :</p><a href="https://w3resource.com">Python Examples</a><a href="http://github.com">Even More Examples</a>'
3urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', text)
4print("Original string: ",text)
5print("Urls: ",urls)