Ok, I am trying to find a the dom pattern:
 <div>
    <br>
    </div>
from my contenteditable div which typically looks like this, with multiple spans:
<div id="edit" contenteditable="true">
    <span>text</span>   
    <span>text</span> 
    //and more spans maybe 
     <div>
        <br>
     </div>
</div>
The line of code that I am using is:
return string.split(/\r\n?|\n|<div>(.*?)<br>(.*?)<\/div>,gis/);
The problem is this portion of the regex <div>(.*?)<br>(.*?)<\/div>,gis.. it never matches, even though the pattern exists. Just for clarity sake, the return runs in a loop across the input text, triggered by the input change event on my contenteditable div. I need an array version of the text delimited every where the pattern is. No library for this please.
 
     
     
     
     
    