I am trying to extract the img and src from a long html string.
I know there are a lot of questions about how to do this, but I have tried and gotten the wrong resu
Not a big fan of using regex to parse html content, so here goes the longer way
var url = ""; var tmp = document.createElement('div'); tmp.innerHTML = url; var src = tmp.querySelector('img').getAttribute('src'); snippet.log(src)