You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/trash/regex1.cpp

22 lines
415 B

#include <iostream>
#include <regex>
#include <string>
using namespace std;
int main()
{
const char *input="Select";
//regex reg1("SELECT (?:.*)(?!FOR UPDATE)$" , regex_constants::icase);
regex reg1("SELECT" , regex::icase);
// while (true) {
// cout<<"Write a query: "<<endl;
// getline (std::cin, input);
// cout<<input<<endl;
if(regex_match(input,reg1)) {
cout<<"Match"<<endl;
}
//}
return 0;
}