It is obvious that here must me match, but this code stills returns false.
#include <iostream>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;
int main() {
cout << regex_match("some text", regex("text")) << endl;
}
It is obvious that here must me match, but this code stills returns false.
#include <iostream>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;
int main() {
cout << regex_match("some text", regex("text")) << endl;
}
regex_match
must match all of the given character sequence. Try regex_search
instead.