Replace URLs using Regexpython1 min readReplacing urls with regex is very easy. import retext = re.sub('http://\S+|https://\S+', '', textWithURLs)