I have a HTML code like this:
<span>This is HTML.</span> This is paragraph.
And I want to replace the span
tag along with
.
My output would be like this:
This is HTML.This is paragraph.
This is what I've tried:
myvar = "<span>This is HTML.</span> This is paragraph.";
newContent = myvar.replace(/<\/?span[^>]*>/g,"");