Det är ganska så mycet tyvär....
Function Forum_ChangeCode(strText)
strText = Replace(server.HTMLEncode(strText&""),vbCrlf,"<br>")
Set objRegExp = New regexp
objRegExp.Global = true
objRegExp.IgnoreCase = true
' Mösnter som ersätter mellanslag
objRegExp.Pattern = "\\40{2,}"
strText = objRegExp.Replace(strText,"  ")
' Mönster som fixar tabar
objRegExp.Pattern = "\\11"
strText = objRegExp.Replace(strText,"    ")
' CODE
objRegExp.Pattern="\\\[code\\\](.\*?)\\\[/code\\\]"
strText = objRegExp.Replace(strText,"\<font style=""font-family: Courier New, Courier, mono;font-Size:11px;"" \>$1\</font\>")
' Include
objRegExp.Pattern="\\<!-- #include file = "(.\*?)\\" -->"
strText = objRegExp.Replace(strText,"\<font color='#666666'\><!--#include file = "$1" -->\</font\>")
objRegExp.Pattern="\\<!--#include file = "(.\*?)\\" -->"
strText = objRegExp.Replace(strText,"\<font color='#666666'\><!--#include file = "$1" -->\</font\>")
objRegExp.Pattern="\\<!-- #include virtual = "(.\*?)\\" -->"
strText = objRegExp.Replace(strText,"\<font color='#666666'\><!--#include file = "$1" -->\</font\>")
objRegExp.Pattern="\\<!--#include virtual = "(.\*?)\\" -->"
strText = objRegExp.Replace(strText,"\<font color='#666666'\><!--#include file = "$1" -->\</font\>")
strText = Replace(strText,"**","\<strong\>")
strText = Replace(strText,"**","\</strong\>")
strText = Replace(strText,"*","\<em\>")
strText = Replace(strText,"*","\</em\>")
objRegExp.Pattern="\\< \*\[bB\] \*>(.\*?)\\</\[bB\] \*>"
strText = objRegExp.Replace(strText,"\<strong\>$1\</strong\>")
objRegExp.Pattern="\\< \*\[iI\] \*>(.\*?)\\</\[iI\] \*>"
strText = objRegExp.Replace(strText,"\<em\>$1\</em\>")
objRegExp.Pattern="\\< \*font \*color \*= \*"\*(.\*?)"\* \*>(.\*?)\\</font>"
strText = objRegExp.Replace(strText,"\<font color=""$1""\>$2\</font\>")
objRegExp.Pattern = "<%"
strText = objRegExp.Replace(strText, "\<font style=""BACKGROUND-COLOR: #cccccc""\><%\</font\>")
objRegExp.Pattern = "%>"
strText = objRegExp.Replace(strText, "\<font style=""BACKGROUND-COLOR: #cccccc""\>%>\</font\>")
' Färg RÖD
objRegExp.Pattern = "request"
strText = objRegExp.Replace(strText, "\<font color=red\>Request\</font\>")
objRegExp.Pattern = "response"
strText = objRegExp.Replace(strText, "\<font color=red\>Response\</font\>")
objRegExp.Pattern = "querystring"
strText = objRegExp.Replace(strText, "\<font color=red\>Querystring\</font\>")
objRegExp.Pattern = "write"
strText = objRegExp.Replace(strText, "\<font color=red\>Write\</font\>")
objRegExp.Pattern = "redirect"
strText = objRegExp.Replace(strText, "\<font color=red\>Redirect\</font\>")
objRegExp.Pattern = "Buffer"
strText = objRegExp.Replace(strText, "\<font color=red\>Buffer\</font\>")
objRegExp.Pattern = "Session"
strText = objRegExp.Replace(strText, "\<font color=red\>Session\</font\>")
objRegExp.Pattern = ".form"
strText = objRegExp.Replace(strText, "\<font color=red\>.Form\</font\>")
' Färg BLÅ
objRegExp.Pattern = "ServerVariables"
strText = objRegExp.Replace(strText, "\<font color=blue\>ServerVariables\</font\>")
objRegExp.Pattern = "execute"
strText = objRegExp.Replace(strText, "\<font color=blue\>Execute\</font\>")
objRegExp.Pattern = "nothing"
strText = objRegExp.Replace(strText, "\<font color=blue\>Nothing\</font\>")
objRegExp.Pattern = "set"
strText = objRegExp.Replace(strText, "\<font color=blue\>Set\</font\>")
objRegExp.Pattern = "now"
strText = objRegExp.Replace(strText, "\<font color=blue\>Now\</font\>")
objRegExp.Pattern = "if"
strText = objRegExp.Replace(strText, "\<font color=blue\>If\</font\>")
objRegExp.Pattern = "end"
strText = objRegExp.Replace(strText, "\<font color=blue\>End\</font\>")
objRegExp.Pattern = "else"
strText = objRegExp.Replace(strText, "\<font color=blue\>Else\</font\>")
objRegExp.Pattern = "then"
strText = objRegExp.Replace(strText, "\<font color=blue\>Then\</font\>")
' Färg GRÖN
objRegExp.Pattern = "select"
strText = objRegExp.Replace(strText, "\<font color=green\>Select\</font\>")
objRegExp.Pattern = "update"
strText = objRegExp.Replace(strText, "\<font color=green\>Update\</font\>")
objRegExp.Pattern = "insert into"
strText = objRegExp.Replace(strText, "\<font color=green\>Insert Into\</font\>")
objRegExp.Pattern = "where"
strText = objRegExp.Replace(strText, "\<font color=green\>Where\</font\>")
objRegExp.Pattern = "from"
strText = objRegExp.Replace(strText, "\<font color=green\>From\</font\>")
objRegExp.Pattern = "VALUES"
strText = objRegExp.Replace(strText, "\<font color=green\>Values\</font\>")
objRegExp.Pattern = "DELETE"
strText = objRegExp.Replace(strText, "\<font color=green\>Delete\</font\>")
' Färg LILA
objRegExp.Pattern = "close"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>Close\</font\>")
objRegExp.Pattern = "eof"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>Eof\</font\>")
objRegExp.Pattern = "bof"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>Bof\</font\>")
objRegExp.Pattern = "Option Explicit"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>Option Explicit\</font\>")
objRegExp.Pattern = "recset"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>RecSet\</font\>")
objRegExp.Pattern = "Option Explicit"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>Option Explicit\</font\>")
objRegExp.Pattern = "uBound"
strText = objRegExp.Replace(strText, "\<font color='#990099'\>uBound\</font\>")
Forum_ChangeCode = strText
End Function