Thread:Project:Support desk/Filter 'a href' but not

I am trying to block edits containing the text  in order to reduce spam bots activity. Firstly I used $wgSpamRegex to filter, yet obviously, all external links within articles got also banned along with them, which I didn't expected to happen.

So, my point is, how to avoid the insertion of  in plain html text, but allow anyway the [external links] wrapped by single sqaure brackets?