C++ Regex not matching multiline strings

后端 未结 2 1882
时光说笑
时光说笑 2021-01-13 01:41

I am having problems with C++0x regex when the string Im matching is a multiline string. Here is the code snippet Im trying to use:

std::smatch regMatch;
std         


        
2条回答
  •  逝去的感伤
    2021-01-13 02:13

    You should use regex_search instead of regex_match.

    By the way, why not use (.*) instead of (.*?)?

提交回复
热议问题