I'm having trouble with whitespaces on this topic, can someone help me out?
int main() {
string test;
regex foo("Daniels[[:w:]]+");
cout << "Test me" << endl;
cin >> test;
bool result= regex_match(test, foo);
cout << (result? "Match" : "No Match") << endl;
}
Im trying to get Daniel "Last Name", but it just won't take the whitespace.I also tried [[:spaces:]] but no luck. Any ideas?
I'm using VS Community
Aucun commentaire:
Enregistrer un commentaire