So it's just a matter of appending and prepending everything between <a and /a>
In all cases there is only one link on each line, in case that matters.
I've tried following lots of examples from the documentation and the forum, but I must be missing something because every time I use \1 or $0 or $1 in the replace text, it results in actually printing \1 or $0 or $1 instead of the original text...