title: Javascript split include delimiters
body: <p>I have the following regular expression:</p>
  
  <pre><code>(&lt;/?[a-z][a-z0-9]*[^&lt;&gt;]*&gt;)
  </code></pre>
  
  <p>I have the following text:</p>
  
  <pre><code>&lt;DIV&gt;&lt;P class='abc'&gt;Hello &lt;B&gt;Mister&lt;/B&gt;! How are you &gt;..&lt; doing? &lt;/P&gt;
  &lt;I&gt;I'm good&lt;/I&gt;&lt;/DIV&gt;
  </code></pre>
  
  <p>Now I'd like to split the text per tag:</p>
  
  <pre><code>&lt;DIV&gt;
  &lt;P class='abc'&gt;
  Hello 
  &lt;B&gt;
  Mister
  &lt;/B&gt;
  ! How are you &gt;..&lt; doing?
  
  &lt;/P&gt;
  &lt;I&gt;
  I'm good
  &lt;/I&gt;
  &lt;/DIV&gt;
  </code></pre>
  
  <p>How can I do this with Javascript regex?<br>
  Is was able to get it to work but had to start over because javascript doesn't support lookbehinds.</p>
  
  <p>(basically split on html tags and keep the delimiters)</p>
  
  <p><strong>Edit:</strong><br>
  My goal with this is to use html to store formatting. I want to feed the html above to a javascript object. The javascript object separates the formatting from the text and does action A for formatting objects and action B for regular text.</p>
  
  <p>I know it sounds a bit vague, but I don't want to reveal too much about the project.</p>