以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何用代码提取html邮件中的文字  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=85503)

--  作者:rjh4078
--  发布时间:2016/5/27 9:23:00
--  如何用代码提取html邮件中的文字

如题 

 

如果直接提取就是一串html代码 我想直接提取文字部分


--  作者:大红袍
--  发布时间:2016/5/27 11:09:00
--  

参考代码

 

Dim str As String = "<DIV><P>如题&nbsp; </P><P>&nbsp;</P><P>如果直接提取就是一串html代码 我想直接提取文字部分</P></DIV>"
msgbox(str)
str = System.Text.RegularExpressions.Regex.Replace(str, "<\\/?.+?>", "")
msgbox(str)