I simply would like to find and replace all occurrences of a twitter url in a string (tweet):
Input:
This is a tweet with a url: http://t.co/0DlGChTBIx
Output:
This is a tweet with a url:
I've tried this:
p=re.compile(r'\<http.+?\>', re.DOTALL)
tweet_clean = re.sub(p, '', tweet)