nix develop: Fix bad regex

This was accepted by libstdc++ but not libc++.

https://hydra.nixos.org/build/123569154
This commit is contained in:
Eelco Dolstra 2020-07-03 14:58:58 +02:00
parent 6f8fd3a3f2
commit c3c7aedbb5

View File

@ -50,7 +50,7 @@ BuildEnvironment readEnvironment(const Path & path)
R"re((?:\$?'(?:[^'\\]|\\[abeEfnrtv\\'"?])*'))re";
static std::string indexedArrayRegex =
R"re((?:\(( *\[[0-9]+]="(?:[^"\\]|\\.)*")**\)))re";
R"re((?:\(( *\[[0-9]+\]="(?:[^"\\]|\\.)*")*\)))re";
static std::regex varRegex(
"^(" + varNameRegex + ")=(" + simpleStringRegex + "|" + quotedStringRegex + "|" + indexedArrayRegex + ")\n");