How to remove any URL within a string in Python February 16, 2023 by Tarik the shortest way re.sub(r'http\S+', '', stringliteral)