I have below string
"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html></html>"
in which I want to remove the below part using JavaScript
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
such that the result should be
<!DOCTYPE HTML><html></html>
I have tries something like
console.log('Data', data);
data.replace("PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN" /"http://www.w3.org/TR/html4/loose.dtd/", "");
console.log('Data', data);
where data contains the complete string
but unfortunately both the logs print the same value.
thanks in advance