title: Javascript and RegEx: Split and keep delimiter
body: <p>I have a regex which will split my string into arrays.</p>
  
  <p>Everyything works fine except that I would like to keep a part of the delimiter.</p>
  
  <p>Here is my regex: </p>
  
  <pre><code>(&amp;#?[a-zA-Z0-9]+;)[\s]
  </code></pre>
  
  <p>in Javascript, I am doing: </p>
  
  <pre><code>var test = paragraph.split(/(&amp;#?[a-zA-Z0-9]+;)[\s]/g);
  </code></pre>
  
  <p>My paragraph is as followed:</p>
  
  <pre><code>Current addresses:  &amp;dagger;    Biopharmaceutical Research and Development&lt;br /&gt;
  &amp;Dagger;    Clovis Oncology&lt;br /&gt;
  &amp;sect;  Pisces Molecular &lt;br /&gt;
  ||  School of Biological Sciences    
  &amp;para;  Department of Chemistry&lt;br /&gt;
  </code></pre>
  
  <p>The problem is that I am getting 10 elements in my array and not 5 as I should. In fact, I am also getting my delimiter as an element and my goal is to keep the delimiter with the splited element and not to create a new one.</p>
  
  <p>Thank you very much for your help.</p>
  
  <p>EDIT:</p>
  
  <p>I would like to get this as a result:</p>
  
  <pre><code>1. &amp;dagger; Biopharmaceutical Research and Development&lt;br /&gt;
  2. &amp;Dagger; Clovis Oncology&lt;br /&gt;
  3. &amp;sect;   &amp;sect;  Pisces Molecular &lt;br /&gt;
  ||  School of Biological Sciences  
  4.  &amp;para;  Department of Chemistry&lt;br /&gt;
  </code></pre>