Skip to content

Commit 2e89f76

Browse files
authored
common: fix issue with regex_escape routine on windows (#14133)
1 parent 532802f commit 2e89f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ size_t string_find_partial_stop(const std::string_view & str, const std::string_
466466

467467
std::string regex_escape(const std::string & s) {
468468
static const std::regex special_chars("[.^$|()*+?\\[\\]{}\\\\]");
469-
return std::regex_replace(s, special_chars, "\\$0");
469+
return std::regex_replace(s, special_chars, "\\$&");
470470
}
471471

472472
std::string string_join(const std::vector<std::string> & values, const std::string & separator) {

0 commit comments

Comments
 (0)