Span content in textarea
<pre><code>&lt;style&gt;    
    .span1{
         left:10px;
     }

    .span2{
         left:20px;
     }
&lt;/style&gt;

&lt;span class='span1'&gt; 1 &lt;/span&gt; 
&lt;span class='span2'&gt; 2 &lt;/span&gt;
</code></pre>

<p>I want to display the above content in textarea, in need a regex where I can replace <code>&lt;span&gt;</code> tags with <code>&amp;nbsp;</code> so that the content in the textarea are correctly shown</p>

<p>It is for text editor where i would like to place certain key words automatically aligned. I am using a textarea in hidden state. When the user alters the code in div it is reflected in to the textarea in the div the code is heighlighting with different colors using css. I want the css tags 1 to be removed and replace 1 10 at the place i wanted in textarea so that when the file is saved, it will be submitted in the correct format.</p>
