title: Get attribute from HTML string (without jQuery)
body: <p>I'm trying to extract an image attribute from a HTML that's pulled in as a String.</p>
  <p>Attempting to use <a href="https://stackoverflow.com/a/40311944/2981404">https://stackoverflow.com/a/40311944/2981404</a> returns:</p>
  <p><code>TypeError: Cannot read properties of undefined (reading 'slice')</code></p>
  <p>My code is as follows:</p>
  <pre><code>const html[0] = '&lt;img src=&quot;/img/image-example.png&quot; class=&quot;image&quot; title=&quot;What Im looking for...&quot; alt=&quot;This is an example image&quot;&gt;'
  const startFromTitle = html[0].slice(
    html[0].search('title')
  )
  const title = startFromTitle.slice(5, startFromTitle.search(' ') - 1)
  console.log(title) // expected &quot;What Im looking for...&quot;
  </code></pre>
  <p>I'd love to use jQuery, but on this project, I can't.</p>