Using A regex that validates a web address and matches an empty string? as a basis for an answer.
Assuming that an HTTP (or HTTPS) address :
- starts with "http://" or "https://"
- contains at least one "." between the TLD and the domain name
- the domain name is composed of letters, numbers _ and -
- the URL is delimited at the end by a space and can contain any other character
then the regular expression could be '(http|https)://[\w-]+(.[\w-]+)+\S*'
>>> import re
>>> re.sub("(http|https)://[\w\-]+(\.[\w\-]+)+\S*", "### URL ###", "There is an URL in this string : https://stackoverflow.com/questions/6532089/regex-to-catch-any-http-address and it is followed by text")
'There is an URL in this string : ### URL ### and it is followed by text'
But it doesn't detect a punctuation after the URL.