[FEA] Ability to regex replace a capture group followed by a digit #8816
Labels
feature request
New feature or request
libcudf
Affects libcudf (C++/CUDA) code.
Spark
Functionality that helps Spark RAPIDS
strings
strings issues (C++ and Python)
Is your feature request related to a problem? Please describe.
I would like to capture a group and then specify in the replace string that the capture group is emitted followed by a zero. The problem is that
\10
looks like I'm asking for capture group 10 instead of capture group 1 followed by a zero.Describe the solution you'd like
If there was an alternate syntax for specifying a capture group, like
${1}
instead of\1
then${1}0
wouldn't be ambiguous what is being requested.Describe alternatives you've considered
One potential issue with the proposed solution is that it adds semantic interpretation of the replace string that didn't exist before. That could break existing use-cases that happen to use a
${1}
syntax or something like it. Another approach could be to allow hexadecimal escapes or some other notation, e.g.:\1\x30
where hex 30 is ASCII0
, but that too will add a new interpretation of potentially pre-existing replace strings.The text was updated successfully, but these errors were encountered: