V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zxCoder
V2EX  ›  问与答

terminate called after throwing an instance of 'std::regex_error'

  •  
  •   zxCoder · 2021-06-14 11:05:09 +08:00 · 594 次点击
    这是一个创建于 1198 天前的主题,其中的信息可能已经有所发展或是发生改变。

    一夜之间所有代码都跑不了了,这是发生了什么吗

    #include <string>
    #include <regex>
    
    int main() {
        std::regex re=std::regex ("keyword");
        std::string str=std::string("keyword-test");
        std::regex_search(str,re);
        return 0;
    }
    

    terminate called after throwing an instance of 'std::regex_error' what(): Unexpected character in brace expression.

    Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

    1 条回复    2021-06-15 00:39:12 +08:00
    ysc3839
        1
    ysc3839  
       2021-06-15 00:39:12 +08:00
    试试重启,重装?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1445 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:16 · PVG 01:16 · LAX 10:16 · JFK 13:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.