import re


def replace_urls(string_input: str, replace_by: str = "URL"):
    """
    Replace url's in a string by replace_by
    :param string_input: string input
    :param replace_by: string, what we want to replace the url with
    :return: string, with urls replaced by replaced_by
    """
    return re.sub(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\), ]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', replace_by,
                  string_input)