V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ybw
V2EX  ›  问与答

C++ utf8 字符串 正则匹配问题

  •  
  •   ybw · Sep 3, 2018 · 2048 views
    This topic created in 2806 days ago, the information mentioned may be changed or developed.

    我有一段 utf8 编码的字符串 实际上是一个 html 文件代码 然后还有一个正则表达式 当然都有中文

    在 C++下完成字符串的匹配、替换 该怎么做?

    1 replies    2018-09-04 22:04:53 +08:00
    gnaggnoyil
        1
    gnaggnoyil  
       Sep 4, 2018
    libicu 转成 UCS4 的`char32_t`,再用`std::basic_regex`做匹配
    什么你说`<charconv>`?醒醒那早就凉了……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 06:44 · PVG 14:44 · LAX 23:44 · JFK 02:44
    ♥ Do have faith in what you're doing.