with "basic" の意味: 演算子 "+" (->following..) および "|" のみ (->or) が必要です。
プロトタイプ:
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]
。ブーストや PCREを使用せずにヒントを得た人はいますか? そうでない場合、ブーストでこれを実現するにはどうすればよいですか?