MFCでは正規表現のライブラリ無いけど標準のほうを使えば使える。
C++11で名前空間がtr1からstdになってるらしいので新しい環境ならそれに置き換えてね
#include <iostream>
#include <string>
#include <regex>
...
std::tr1::regex regPattern(strPattern);
std::tr1::match_results<const char *> results;
regex_search(strText.GetBuffer(), results, regPattern, std::tr1::regex_constants::match_default);
CString resultString = "";
std::tr1::match_results<const char *>::const_iterator it = results.begin();
while (it != results.end()) {
if (it->matched) {
std::string tmp;
tmp = it->str();
resultString.Format("%s",tmp.c_str());
}
it++;
}