I have the following string in Javascript and need to remove the <?xml ... ?>
and <!DOCTYPE .... ]>
tags. Can not convert it to a dom because the BR tags error as not being closed - and not able to edit the actual content.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html [<!ENTITY amp "&#38;">]><div>Blah<br> Blah</div>
Trying to do it with .replace but can't quite seem to get there
text.replace(/\<\?xml.+\?\>/g, '');