Extract Part of Title Tag
<p>Does anyone know how to extract part of the title tag using Javascript? Like, extract all text in the title tag up to a dash character, and not text after the dash character.</p>

<p><strong>Example</strong><br>
<code>&lt;title&gt;Extract this text-But not text after the dash&lt;/title&gt;</code></p>
