View Single Post
Old 10-08-2012, 05:55 PM   PM User | #7
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
here's how WolfShade's regex would work on page load:

Code:
<body>
<input id="txt" value="<pre><pre><pre><pre><pre><pre><pre><pre>Testing description field</pre></pre></pre></pre></pre></pre></pre></pre>"/>
<script type="text/javascript">
document.getElementById("txt").value=document.getElementById("txt").value.replace(/\<(\/)*pre\>/g,"")
</script>
</body>
if you have the rewrap bit sorted, you should be fine.
xelawho is offline   Reply With Quote