MrMistreater

Remove HTML tags

May 9th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. using System.Text.RegularExpressions;
  2.  
  3. public string removeHTML(string input)
  4. {
  5.     string pattern = @"<(.|\n)*?>";
  6.     Regex regex = new Regex(pattern, RegexOptions.Singleline);
  7.  
  8.     string output = regex.Replace(input, string.Empty);
  9.    
  10.     return output;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment