我想使用“ Qt/C++ ”从以下 HTML 代码中提取一些文本QRegExp
。
<TABLE border="0" width="99%">
<COLGROUP><COL width="100"><COL>
<TR>
<TD align="center" valign="middle" bgcolor="#EEEEFF"><B> MCT-to-KR</B>
<TD align="center" valign="middle" bgcolor="#EEEEFF"><FONT class="result">THIS IS THE TEXT WHICH I WANT TO FETCH</FONT>
<TR>
<TD align="center" valign="middle" bgcolor="#DDDDEE">Normalized
<TD align="center" valign="middle" bgcolor="#DDDDEE">[AL-LYA-A]
<TR>
<TD align="center" valign="middle" bgcolor="#CCCCDD">Web Unicode
<TD align="center" valign="middle" bgcolor="#CCCCDD">ANOTHER TEXT I MIGHT BE INTERESTED IN, BUT WOULD BE EASY TO GET IF THE FIRST IS DONE
</TABLE>
在C#.Net中,我可以这样做:
private Regex txtExtractor = new Regex(@"<FONT class=""result"">(.*?)</FONT>");
我厌倦了它QRegExp
但没有工作,那么我应该如何编辑它以使其工作?