According to Andrew Green:
Oh, now that's really good. I often need to add '</li>' to the end of a bunch of lines, and it's something that's always been clunky.
You do realise that it is very easy with regexp? Just replace $ with </li> and you're set.