I looked at that, and the QRegularExpression equivalent for QTextDocument::find(). All of the find() methods return a QTextCursor pointing to the first position in the found string (if any). Then what? I think the OP is having the same problem that I could see at that point - there is no way to retrieve the full text fragment that was matched by the regexp and highlight (select) it. QTextCursor gives you four ways to select text: whole document, block under cursor, line under cursor, or word under cursor.
It seems I have trouble understanding what the problem is...
In the case of a mail address, you could use the word under cursor option - don't you agree?

None of these will work for a URL - as I think the OP is seeing, "WordUnderCursor" breaks at the first non-character position, which is the "@" symbol in his examples.
Are you sure it's break at first non-character and not at first white space?
I don't have the time to check, but if you are right, I am very surprised.

So the bottom line question is, how do you find and highlight an arbitrary string in a QTextDocument?
OK, now that is a clear question! :-)

Did you guys have a look at QSyntaxHighlighter ?
I used it some years back and had no trouble highlighting text - but for any more details I will have to look in again...