The following is the code snippet: StringWriter textBuffer = new StringWriter (); Match match = Regex.Match (HTMLStr, @ "/", RegexOptions.IgnoreCase | RegexOptions.Compiled); if (match == null) {Response.Write (HTMLStr) Return;} String CodeType = match.groups ["CODETYPE"]. Value; string content = match.groups ["codecontent"]. value; if (codetype == String.empty || content == string.empty) { Response.write (HTMLSTR); Return;} // messagebox.show (codetype); // messagebox.show (content); string [] sr = content.split (convert.tochar ("/ n")); if ( CODETYPE == "C #") {TextBuffer.write ("