vc++ greta html转 txt
CString html2txt(CString html)
{
CString m_strReg="<script[^>]*?>.*?</script>|<style[^>]*?>.*?</style>|<[\\/\\!]*?[^<>]*?>|<![\\s\\S]*?--[ \\t\\n\\r]*>";
CString m_strResult = "";
REGEX_FLAGS dw = GLOBAL | ALLBACKREFS | NOCASE;
rpattern pat((LPCTSTR)m_strReg, "", dw);
subst_results subResult;
string str((LPCTSTR)html);
int nCount = pat.substitute(str, subResult);
m_strResult = str.c_str();
return m_strResult;
}
摘自 zzz_781111的专栏
补充:软件开发 , Vc ,