Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
path-regex.hh
Go to the documentation of this file.
1#pragma once
3
4namespace nix {
5
6
7static constexpr std::string_view nameRegexStr =
8 // This uses a negative lookahead: (?!\.\.?(-|$))
9 // - deny ".", "..", or those strings followed by '-'
10 // - when it's not those, start again at the start of the input and apply the next regex, which is [0-9a-zA-Z\+\-\._\?=]+
11 R"((?!\.\.?(-|$))[0-9a-zA-Z\+\-\._\?=]+)";
12
13}