fork(3) download
  1. #include <regex>
  2. #include <string>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main() {
  7. std::regex matchPattern(R"(@([^=]+))");
  8. std::string s("@test=boundary");
  9. std::smatch matches;
  10. if (std::regex_search(s, matches, matchPattern)) {
  11. std::cout<<matches.str(1);
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 4396KB
stdin
Standard input is empty
stdout
test