Posted By

pauliehaha on 03/23/10


Tagged

html


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

LeeRJohnson


Strip Html Extension Method


 / Published in: C#
 

  1. using System.Text.RegularExpressions;
  2.  
  3. namespace Solution.Core.Extensions
  4. {
  5. public static class StringExtensions
  6. {
  7. public static string StripHtml (this string inputString)
  8. {
  9. const string htmlTagPattern = "<(.|\n)*?>";
  10. return Regex.Replace(inputString, htmlTagPattern, string.Empty);
  11. }
  12. }
  13. }

Report this snippet  

You need to login to post a comment.