Open
Description
Is your feature request related to a problem?
pd.Categorical doesn't implement regex=
, preventing a generalisable solution at #32542.
Describe the solution you'd like
As far as I can tell, the best solution would be an refactor of .replace() methods and logic.
API breaking implications
Describe alternatives you've considered
Parts of the logic from array_algos.replace.replace_regex() can be copied over to pd.Categorical, but that's not desirable. Therefore the suggestion for the refactor.
Additional context
This came up while working with the suggestion here.