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.
We need to remove escape characters in the regexp_replace replacement string before passing to cuDF.