Inconsistent behavior of std::regex
问题 I have the following issue where: std::regex behaves differently if I pass the result of boost::filesystem::path::string() vs storing the result in a intermediate string variable. The first will return a match that is truncated and which is later not accepted by std::stoull (throws invalid_argument exception) while the second works perfectly. See the following commands that explain more the issue: [nix-shell:~]$ ls -l foo total 0 -rw-r--r-- 1 amine users 0 Aug 10 16:55 008 -rw-r--r-- 1 amine