i have a tag with some veriable content inside. i would like to be able to remove that tag and all its contents using a javascript srt.replace()
.
i would usually use something like jQuery('.tag-class').remove()
but jQuery isn't an option in this case.
i believe a regular expression is what i am looking for but after poking around for quite some time, i am no closer than when i started.
i need to do this.
var myContent = 'bla bla bla <div class="remove-me">variable content here</div> something something';
// run some cool replace() here and get
// bla bla bla something something
any suggestions would be great!