From 8f5cde795ef1c40179753614c59f78ebec75ac30 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 12 May 2022 11:02:51 -0400 Subject: [PATCH] move variable r declaration --- cpp/src/strings/replace/backref_re.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/strings/replace/backref_re.cu b/cpp/src/strings/replace/backref_re.cu index 49ea1bcc3fc..55498e760ff 100644 --- a/cpp/src/strings/replace/backref_re.cu +++ b/cpp/src/strings/replace/backref_re.cu @@ -50,8 +50,8 @@ std::string get_backref_pattern(std::string_view repl) { std::string const backslash_pattern = "\\\\(\\d+)"; std::string const bracket_pattern = "\\$\\{(\\d+)\\}"; + std::string const r{repl}; std::smatch m; - std::string r{repl}; return std::regex_search(r, m, std::regex(backslash_pattern)) ? backslash_pattern : bracket_pattern; }