Search Results for 'HTML태그제거'


1 POSTS

  1. 2008/05/09 문자열에서 HTML 태그 벗겨내기 (like strip_tags in PHP)
Regular Expression 써서 다음과 같이 하면 됩니다.

public static string StripTags(string html)
{
    return Regex.Replace(html, @"<(.|\n)*?>", string.Empty);
}

다음의 네임스페이스가 필요합니다.

using System.Text.RegularExpressions;

참고 : http://www.vandamme.com/blog.aspx?id=512&blogid=194

Tag : , ,

코멘트를 남겨 주세요. (Write your message and submit)