Skip to content

Conversation

cboseak
Copy link

@cboseak cboseak commented Jun 3, 2025

Fixes #1760

Description

Per issue #1760's request, this is a feature to have Replace function support the group capture in the replacement string


Important Notes

  • In Rust's regex implementation, the replacement string syntax is custom and not identical to Perl or other languages that use backslash (\1, \2, etc.) for backreferences in replacement strings. Instead $1 $2 is valid for a group replace string.
    • \1 replace syntax was converted to $1 syntax to allow that

Testing

  • added tests
  • all tests passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

normalizers.Replace able to support regex group capture
1 participant