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