[cfe-dev] [libc++] regex parse wrong in libc++.1.dylib (400.9.4)

黄奕 via cfe-dev cfe-dev at lists.llvm.org
Sun Sep 2 23:07:29 PDT 2018


System:  MacOs 10.13.6
LibC++ Version: 400.9.4
LibSystem : 1252.200.5
IDE: Xcode 10.0 beta




...
std::regex decode_href() { return std::regex(R"(\[([\s\S]*?)\]\(([\s\S]*?)\))")
...
auto expr = decode_href();
std::sregex_iterator it(text.cbegin(), text.cend(), expr);
std::sregex_iterator end;
for(; it != end; ++it){
        ...
 }
...


I found in ver 400.9.4, it could not parse successfully with an input of "[URL](https://www.baidu.com)" (text = "[URL](https://www.baidu.com)").
while it works well in ver 400.9.0.
I m not sure it is a bug or

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180903/7c52d9e8/attachment.html>


More information about the cfe-dev mailing list