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 · 561 次点击
    这是一个创建于 1018 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    #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   ·   我们的愿景   ·   实用小工具   ·   1021 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 19:57 · PVG 03:57 · LAX 12:57 · JFK 15:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.