Considering that $ can match before or after a newline,
and a regular expression will match the first place in a
string that it can, this will replace the last character
before the newline with the tag. Which isn't what you
wanted to do...
Comment on Re (tilly) 2: Replace new line char with br