title: javascript regex to match everything between two strings (without newline)
body: <p>I'm trying to match all text (including special chars and markup tags) between two tags, but, when there are two matches on the same line, the regex considers as one match.</p>
  <p>I stopped with this expression:</p>
  <pre class="lang-js prettyprint-override"><code>(?&lt;=&lt;br&gt;&lt;i&gt;)[^&lt;\/i&gt;].*(?=&lt;\/i&gt;&lt;br&gt;)
  </code></pre>
  <p>Beginning tag:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;br&gt;&lt;i&gt;
  </code></pre>
  <p>End tag:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;/i&gt;&lt;br&gt;
  </code></pre>
  <p>It works with an html containing this:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;br&gt;&lt;i&gt;&quot;hello olá - ok@tchau&quot;&lt;/i&gt;&lt;br&gt;  
  &lt;br&gt;&lt;i&gt;&quot;another text&quot;&lt;/i&gt;&lt;br&gt;
  </code></pre>
  <p>But with this html it doesn't work:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;br&gt;&lt;i&gt;&quot;hello&quot;&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;i&gt;&quot;ok&quot;&lt;/i&gt;&lt;br&gt;
  </code></pre>
  <p><a href="https://regex101.com/r/kHd2z2/1" rel="nofollow noreferrer">https://regex101.com/r/kHd2z2/1</a></p>