【发布时间】:2017-12-21 16:14:06
【问题描述】:
我有一个字符串测试
<td><a href="4.%20Functions,%20scope.ppt">4. Functions, scope.ppt</a></td>
我想找到<a href="4.%20Functions,%20scope.ppt">(作为子字符串)
使用 Dr.Google 进行搜索:regex e ("<a href=.*?>"); cmatch =cm; 以标记我要查找的子字符串。
接下来我该怎么做?
我可以使用regex_match(htmlString, cm, e); 和htmlString 作为wchar_t*
【问题讨论】:
-
“接下来我该怎么做?”是什么意思?是否要查找 所有 匹配的子字符串?
-
向 Google 博士寻求治疗方法。
-
为什么 wchat_t 而不仅仅是 char?
-
要匹配一个精确的字符串,您不需要正则表达式。