Today I LearnedReplace URLs using RegexpythonReplacing urls with regex is very easy. import re text = re.sub('http://\S+|https://\S+', '', textWithURLs)