Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
path-regex.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <string_view>
5
6
namespace
nix {
7
8
static
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
}
libstore
include
nix
store
path-regex.hh
Generated by
1.18.0