I'd like to automatically highlight and extract URLs from a QWebView or QTextEdit. I've found a lot of RegEx examples on the web which allows to do just that, but most of them seem overly complicated, don't work properly or are not compatible with Qt4's RegExp implementation.
So I'm asking here for a Qt4-specific RegExp pattern which allows for reliable URL highlighting, possibly in the context of surrounding text (documentation, chat, etc.). It should be able to highlight mailto:
links, and protocols other than http://
, such as https://
or ftp://
.