Skip to content

Commit 8c913e9

Browse files
author
yangon99
committed
fix backslash match
1 parent 86fe42e commit 8c913e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ string join2str(const int argc, char **argv, const char delm) {
2525
bool startWith(string s, string prefix) { return s.rfind(prefix, 0) == 0; }
2626

2727
bool validCgroup(const string cgroup) {
28-
return regex_match(cgroup, regex("^/[a-zA-Z0-9\\-_./@]*$"));
28+
return regex_match(cgroup, regex("^/[a-zA-Z0-9-\\\\_./@]*$"));
2929
}
3030

3131
bool validCgroup(const vector<string> cgroup) {
3232
for (auto &e : cgroup) {
33-
if (!regex_match(e, regex("^/[a-zA-Z0-9\\-_./@]*$"))) { return false; }
33+
if (!regex_match(e, regex("^/[a-zA-Z0-9-\\\\_./@]*$"))) { return false; }
3434
}
3535
return true;
3636
}

0 commit comments

Comments
 (0)