title: Regular expression to match text outside html tags and not between specific tag
body: <p>I trying to get a regular expression to match some words outside and between html tags (and not in tags themselves), but I also need to exclude them when they are between html heading tags (h1, h2, h3, etc...)</p>
  
  <p>Here is what i tried: <code>/(\bword\b)(?=[^&gt;]*(&lt;|$))/i</code></p>
  
  <p>Live example:
  <a href="https://regex101.com/r/rM8tU3/1" rel="nofollow">https://regex101.com/r/rM8tU3/1</a></p>
  
  <p>Excluding heading tags is the only element missing.</p>