fork download
  1. #include <iostream>
  2. #include <regex>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main() {
  7. string str = R"(D:\Praxisphase 1 project\test\Brainstorming.docx)";
  8. regex ex(R"([^\\]+(?=\.docx$))");
  9. if (regex_search(str, ex)){
  10. cout << "match found"<< endl;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 3552KB
stdin
Standard input is empty
stdout
match found