jQuery how to insert <br/> tag after every Semicolon
<p>I am dumping some CSS into a div and I am looking to format it so it is more legible. Basically what I want to do is insert a break tag after every semicolon. I have searched around for a while but can't seem to find something that quite fits what I am trying to do.</p>

<p>I have something like this...</p>

<p><strong>HTML</strong></p>

<pre><code>&lt;div class='test'&gt;
color:red;background-color:black;
&lt;/div&gt;​
</code></pre>

<p><strong>jQuery</strong></p>

<pre><code>var test = $('.test').text();
var result = test.match(/;/g);   

alert(result);​
</code></pre>

<p><strong>And I have tried..</strong></p>

<pre><code>var test = $('.test').text();
var result = test.match(/;/g);   

result.each(function(){
$('&lt;br/&gt;').insertAfter(';');
});    

alert(result);​
</code></pre>

<p>Also I have started a fiddle here.. Which basically just returns the matched character...
<a href="http://jsfiddle.net/krishollenbeck/zW3mj/9/" rel="nofollow">http://jsfiddle.net/krishollenbeck/zW3mj/9/</a>
That is the only part I have been able to get to work so far.</p>

<p>I feel like I am sort of heading down the right path with this but I know it isn't right because it errors out. I am thinking there is a way to insert a break tag after each matched element, but I am not really sure how to get there. Any help is much appreciated. Thanks...</p>
