在C ++中使用RegEx char转义

时间:2013-09-13 02:22:47

标签: c++ regex c++11 g++ std

我使用std::regex,下一个代码给我例外:

try {
    regex rnl("\\b(sub)([^ ]*)");
} catch (regex_error& e) {
    cout << e.code() << endl;    
}

e.code() == 2,我认为\\b中有什么问题。我如何创建正确的regex

0 个答案:

没有答案
相关问题