Instead of using regexes which have the problem of being regexes, you could parse these using the DOM instead. ```js let template = document.createElement('template'); template.innerHTML = html; // Pluck out scripts and styles, etc. ```