fork download
  1. #include <iostream>
  2. #include <regex>
  3. using namespace std;
  4.  
  5. int main() {
  6. string str("ProxyPort = 12000");
  7.  
  8. regex e("^(\\w+)\\s*=\\s*(.+)");
  9.  
  10. if (regex_match(str,e))
  11. cout<<"Matched";
  12. else
  13. cout<<"No Match";
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5272KB
stdin
a b
stdout
Matched