Created
February 15, 2017 15:56
-
-
Save naaando/3c3d85d2eadf4bc41ded198434e8bac5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #include <cstdlib> | |
#include <iostream> | |
#include <boost/regex.hpp> | |
using namespace std; | |
using namespace boost; | |
int main(int argc, char *argv[]) { | |
string str = "2"; | |
regex re("[0-9]"); | |
try{ | |
re.assign(str, boost::regex_constants::icase); | |
} | |
catch(boost::regex_error e){ | |
cout << e.what() << endl; | |
} | |
try{ | |
if (boost::regex_match(str, re)){ // O erro no link aparece aqui... | |
cout << "Encontrado..." << endl; | |
} | |
else | |
cout << "Nn Encontrado..." << endl; | |
} | |
catch(boost::regex_error e){ | |
cout << e.what() << endl; | |
} | |
// system("pause"); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment