It should be possible with `cheerio` to perform these replacements rather than regex:

```
> var html = $('<div>This is <a href="http://google.ca">My Link</a>, please click.</div>');
undefined
> html.find('a').replaceWith(function() { return $(this).attr('href'); });
...
> html.toString();
'<div>This is http://google.ca, please click.</div>'
```