Split html string with regex
<p>It's possible to split an html string with regex like this one</p>

<pre><code>var mystring="&lt;p style='display:inline'&gt;hello world&lt;/p&gt;!!';
</code></pre>

<p>and obtain an array like this one?</p>

<pre><code>[&lt;p style='display:inline'&gt;,hello world,&lt;/p&gt;,!!]
</code></pre>

<p>UPDATE: I did it using the following regex</p>

<pre><code>mystring.split(/(&lt;\/?\w+(?:(?:\s+\w+(?:\s*=\s*(?:".*?"|'.*?'|[^'"&gt;\s]+))?)+\s*|\s*)\/?&gt;)/gim);
</code></pre>

<p>Thank you</p>
