classic asp replacing inside pre tag

Rodigoz

New Member
I have like following text which get from html form. Now I want to save it into db. Before saving I need to parse for line break replacing with \[code\]<BR />\[/code\] tag.I only need to replace text outside of \[code\]<pre>\[/code\] tag and leave text as it is inside of \[code\]<pre></pre>\[/code\] tag.This is what I currently have:\[code\] strTxt="aaaaaaaaaaaa bbbbbbbbbbb <pre> sss ssss sss ddd </pre> asdafdsf sfsfsdf <pre> sfdsf sdfs </pre> asfasfsaf"\[/code\]And I want the result to be:\[code\]strTxt="aaaaaaaaaaaa<br /> bbbbbbbbbbb<br /> <pre> sss ssss sss ddd </pre> asdafdsf<br /> sfsfsdf<br /> <pre> sfdsf sdfs </pre> asfasfsaf"\[/code\]
 
Top