jitti

jitti

  • NA
  • 3
  • 0

Need help, Please convert from vb.net to C#

Jun 7 2004 5:46 AM
I try to convert the code below to c# , but i can not. Please help . JC ----------------------------------------------------------------- Public Shared Function Cleanx() As String Dim Contents As String Contents = "ss aaa xxxx " Dim RegExp As Regex RegExp = New Regex("", RegexOptions.IgnoreCase) Contents = RegExp.Replace(Contents, "<(select|option|script|style|title)(.*?)>((.|\n)*?)", " ", RegexOptions.IgnoreCase) Contents = RegExp.Replace(Contents, "&(nbsp|quot|copy);", "") Contents = RegExp.Replace(Contents, "<[^>]*>", "") Contents = RegExp.Replace(Contents, "<([\s\S])+?>", " ", RegexOptions.IgnoreCase).Replace(" ", " ") Contents = RegExp.Replace(Contents, "<[^<>]+>", " ", RegexOptions.IgnoreCase) ' Contents = RegExp.Replace("(<(\w+)[^>]*?>(.*?)", "$1") Contents = RegExp.Replace(Contents, "\W", " ") 'Trace.Warn("File Contents", Contents) Return (Contents) End Function

Answers (5)