From 80eeb6360b19fad5deb90a0df7edd4085db442b3 Mon Sep 17 00:00:00 2001 From: zishan044 Date: Sat, 11 Oct 2025 17:27:24 +0600 Subject: [PATCH] BUG: fix regex numeric group replacement in PyArrow string arrays --- pandas/core/arrays/_arrow_string_mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/arrays/_arrow_string_mixins.py b/pandas/core/arrays/_arrow_string_mixins.py index d4f4c5bdea0a0..48e47c44c148b 100644 --- a/pandas/core/arrays/_arrow_string_mixins.py +++ b/pandas/core/arrays/_arrow_string_mixins.py @@ -175,7 +175,7 @@ def _str_replace( or flags or ( isinstance(repl, str) - and (r"\g<" in repl or re.search(r"\\\d", repl) is not None) + and r"\g<" in repl # Block named group references (\g); numeric groups (\1) are supported by PyArrow ) ): raise NotImplementedError(