What is the regular expression SO/SE sites use for making the hyperlink active?

There is a problem if the hyperlink is in the sentence, that it might be followed by interpunction. I see that if there is a dot or parenthesis at the end of hyperlink, it is not considered its part. So is it something like this?