I'm having a bit of trouble with a couple of regex's that I almost got working earlier. I basically need to remove HTML comments from either side of a specific <span>
tag.
This is what I have so far:
.replace(/<!--<span aria-hidden=\"true\" data-icon=\"e\"/,
'<span aria-hidden="true" data-icon="e"')
.replace(/onclick=\"deletetodo(this)\"><\/span>-->/,
'onclick="deletetodo(this)"></span>');
Maybe I've been staring at this for too long and I can't spot an obvious mistake, but if anyone knows why this wont get rid of the <!--
and -->
tags, you'd be saving me a massive headache!
Thanks.
[edit] Multi-lined for SO only, in code they're on a single line. [/edit]