-
-
Save walterreade/ea3cf5c9bcf1f2d1b5bd425431332125 to your computer and use it in GitHub Desktop.
This file contains 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