WEB TIP/ASP

HTML 제거 함수

제프 2008. 11. 13. 22:19

출처 : Proglamor

HTML 태그를 제거 하는 함수 이다.

function removeHTML(strHTML)

   dim objRegExp

   on error resume next
  set objRegExp = New RegExp

   With objRegExp
      .Global = true
      .IgnoreCase = true
      .Pattern = "<[a-zA-Z\/\s][^>]*>"
      strHTML = .Replace(strHTML, "")
  end With

   set objRegExp = nothing
  removeHTML = strHTML

end function