Posted By

ginoplusio on 02/09/10


Tagged

striptagsregexp


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ginoplusio
fwd


ASP simple strip_tags function


 / Published in: ASP
 

URL: http://www.barattalo.it/2010/02/09/asp-strip-tags-function-equivalent-to-php/

A simple strip tags function, equivalent to PHP function.

  1. function strip_tags(strHTML)
  2. dim regEx
  3. Set regEx = New RegExp
  4. With regEx
  5. .Pattern = "<(.|\n)+?>"
  6. .IgnoreCase = true
  7. .Global = true
  8. End With
  9. strip_tags = regEx.replace(strHTML, "")
  10. end function

Report this snippet  

You need to login to post a comment.