title: asp classic replace <br> in section of output BBCode
body: <p>I have create a demo file, that you can download, and a page to see it running. What I need to have done, is that all the 
  tags, need to be removed ONLY in the area (BBCode [code])</p>
  
  <p>UPDATE:
  The code does not work with multiple BBCode tags. So if there is</p>
  
  <pre>
  [URL]
  [Site]
  [B]
  </pre>
  
  <p>Or anything else, the script below breaks all the tags. And will not process the page properly.</p>
  
  <p>Here is the link to the demo page. 
  <a href="http://www.cffcs.com/test/EE/Main.asp" rel="nofollow">http://www.cffcs.com/test/EE/Main.asp</a></p>
  
  <p>Here is the link to the download .zip file. <a href="http://www.cffcs.com/test/EE/Request.zip" rel="nofollow">http://www.cffcs.com/test/EE/Request.zip</a></p>
  
  <p>If someone can assist me with this, I will be mighty grateful.</p>
  
  <p>The following code, is used, however, I found that it breaks everything else that is NOT involved in the '[code' section
  This is what is being used, of which can be found in the code file above.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Function ReplaceChar(strString)
      strString = Reggex(strString, "\[code=(.*?)\](.*?)\[\/code\]", "&lt;code class=""$1""&gt;$2&lt;/code&gt;")
      ReplaceChar = strString
  End Function
  
  
  
  Function ProtectSQL(SQLString)
      SQLString = SQLString
      SQLString = Replace(SQLString, "'", "''") ' replace &gt; with &amp;gt;
      SQLString = Replace(SQLString, vblf,"&lt;br&gt;") ' replace vblf with &lt;br /&gt; (This is mainly used for Memo fields.
      SQLString = Trim(SQLString)
      ProtectSQL = SQLString
  End Function
  
  
  getText = ProtectSQL(request.form("Answers"))
  bigString = ReplaceChar(getText)
  
  
  
  'grab the left chunk of text starting to the position just after [code
  startString = LEFT(bigString, INSTR(bigString, "&lt;code ") + 6)
  endString = RIGHT(bigString, LEN(bigString)-INSTR(bigString, "&lt;/code&gt;")+1)
  midString = REPLACE(bigString, endString, "")
  midString = REPLACE(midString, startString, "")
  midString = REPLACE(midString, "&lt;br&gt;",vbLf)
  bigString = startString &amp; midString &amp; endString
  </code></pre>