Nix 2.26.3
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
8
9static constexpr std::string_view nameRegexStr =
10 // This uses a negative lookahead: (?!\.\.?(-|$))
11 // - deny ".", "..", or those strings followed by '-'
12 // - when it's not those, start again at the start of the input and apply the next regex, which is [0-9a-zA-Z\+\-\._\?=]+
13 R"((?!\.\.?(-|$))[0-9a-zA-Z\+\-\._\?=]+)";
14
15}