I am cleaning my data from urls I tried:
s = 'hello http://www.google.com I am william http://www.google.com'
from urlparse import urlparse
s.split()
clean = ' '.join([el for el in [i for i in s.split()] if not urlparse(el).scheme])
print(clean)
desired output:
hello I am william
However this time I would like to achieve the same output using instead a regular expression.