13. 5. 21.

Classic ASP HTML 태그 제거

'태그제거
function StripTags( htmlDoc )
  dim rex
  set rex = new Regexp
  rex.Pattern= "<[^>]+>"
  rex.Global=true
  StripTags =rex.Replace(htmlDoc,"")
end function

html = "<a href=""http://2nusa.blogspot.kr/""><b>Hello My World</b></a>"

response.write(StripTags(html ))

댓글 없음:

댓글 쓰기