Convert symbols of back-references if input string contains any.
Convert symbols of back-references if input string contains any. In spark's regex rule, there are two patterns of back-references: \group_index and $group_index This method transforms above two patterns into cuDF pattern ${group_index}, except they are preceded by escape character.
replacement string
A pair consists of a boolean indicating whether containing any backref and the converted replacement.
Returns the number of groups in regexp (includes both capturing and non-capturing groups)
Recursively check if pattern contains only zero-match repetitions ?, *, {0,}, or {0,n} or any combination of them.
We need to remove escape characters in the regexp_replace replacement string before passing to cuDF.