Created
April 17, 2016 23:39
-
-
Save cxtadment/e3aaaa1e5e59ba4a2ae279ca4d469ecc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def removeLink(content): | |
urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', content) | |
for i in range(0, len(urls)): | |
content = content.replace(urls[i], '') | |
return content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment