Microsoft MVP성태의 닷넷 이야기
.NET : 19. HTML InnerText 구하기 [링크 복사], [링크+제목 복사]
조회: 5031
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

Easy code: Parse HTML String to get InnerText
; http://blogs.msdn.com/maximelamure/archive/2007/01/26/easy-code-parse-html-string-to-get-innertext.aspx

간단하니 그냥 실어보겠습니다.

public static string GetInnerHtmltext(string data)
{
  string decode = System.Web.HttpUtility.HtmlDecode(data);
  Regex objRegExp = new Regex("<(.|\n)+?>");
  string replace = objRegExp.Replace(decode, "");
  return replace.Trim ("\t\r\n ".ToCharArray ());
}








[최초 등록일: ]
[최종 수정일: 1/28/2007]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-동일조건변경허락 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  [8] 
NoWriterDateCnt.TitleFile(s)
18정성태7/17/20034004RegistryEx 클래스 (VC++6.0, Win32) 2000.02.28파일 다운로드1
17정성태9/22/20054866Crypto 클래스 (VC++6.0, Win32) [1]파일 다운로드1
16정성태7/17/20034424Win32 Control Spy (Win32)파일 다운로드1
15정성태7/17/20035103RichEdit Control 클래스 (VC ++ 6.0)파일 다운로드1
1  2  3  4  5  6  7  [8]