带有“基本”的意思是:只有运算符“+”(->following..)和“|” (-> 或) 是必需的。
原型:
preg_match_all(std::string pattern, std::string subject, std::vector<std::string> &matches)
使用示例:
std::vector<std::string> matches;
std::string pattern, subject;
subject = "Some text with a lots of foo foo and " + char(255) + " again " + char(255);
pattern = "/" + char(255) + char(255) + "+|foo+/";
preg_match_all(pattern, subject, matches);
比赛之后应该可以通过matches[n]
. 有人在不使用boost和/或 PCRE 的情况下得到了提示?如果没有,我是如何通过 boost 实现这一点的?