How To Remove The End Tag From A Html String Using Js
I want to remove the end tag of a given HTML string. I get the HTML string from the document like so: var front = $('
').append($(clean_copy).contents().remove().end()).r
Solution 1:
try front.replace(/<\/div>$/)
It replaces your div.
If you like to replace any last end tag use this front.replace(/<\/\S+>$/)
Post a Comment for "How To Remove The End Tag From A Html String Using Js"