title: Regex pattern to match hashtag, but not in HTML attributes
body: <p>I'm trying to <strong>extract hashtags in an HTML text</strong> with the regular expression <code>#([a-z0-9_]+)</code>, but with troubles in HTML attributes.</p>
  
  <p>For example in the HTML text:</p>
  
  <pre><code>hola que tal with #hash1.
  hola que tal with #hash2
  
  y &lt;a href="hola.que.tal#hash3"&gt; para #hash4. &lt;/a&gt;
  </code></pre>
  
  <p>I want to recover "hash1", "hash2" and "hash4" but <strong>not</strong> "hash3".</p>
  
  <p>I tried to resolve it with lookarounds, with the following expression:</p>
  
  <pre><code>(?&lt;!&lt;)#([a-z0-9_]+)(?!.*?&gt;)
  </code></pre>
  
  <p>but without success.</p>
  
  <p>How I can do it with a <strong>single regular expression</strong>?</p>