This regex catches markdown links where the display text is also a link, like this: [example.com](https://malicious.link) in order to prevent people getting tricked and clicking on a link that isn't what it says it is.
See the test string for a much longer explanation with examples.