import re


def replace_urls(string, replacement=None):
    """
    Replace URLs in `string` with text of `replacement`
    """
    if replacement is None:
        replacement = "<-URL->"
    pattern = re.compile('(https?://)?(\w*[.]\w+)+([/?=&]+\w+)*')
    return re.sub(pattern, replacement, string)