I have the following string:
var x = '<p>Hello there <span contenteditable="false" class="fr-deletable">aaa</span>,<br></p><p>Hi <span contenteditable="false" class="fr-deletable">bbbb</span>,<br></p>';
I basically want to strip out all of the <span></span>
tags but keep the inner content in tact. So the above should turn into:
'<p>Hello there aaa,<br></p><p>Hi bbbb,<br></p>';
I've tried a few things:
x.replace(/<span.*>(.*)<\/span>/g, '$1');
x.replace(/<span.*>/g, '');
But none of these gets me what I need. Help please?