Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReplaceStringProcessor for simple string substitution that doesn't involve regex #4953

Closed
dinujoh opened this issue Sep 17, 2024 · 1 comment · Fixed by #4954
Closed
Labels
enhancement New feature or request

Comments

@dinujoh
Copy link
Member

dinujoh commented Sep 17, 2024

Is your feature request related to a problem? Please describe.
It would be nice to have ReplaceStringProcessor that use Java String.replace() method that is highly optimized for simple string replacements. It uses a more efficient algorithm than the Matcher.replaceAll() method used in SubstituteStringProcessor

Describe the solution you'd like
ReplaceStringProcessor implementation

final String newValue = value.replace(entry.getFrom(), entry.getTo());
recordEvent.put(entry.getSource(), newValue);
@oeyh
Copy link
Collaborator

oeyh commented Sep 19, 2024

Resolved by #4954

@oeyh oeyh closed this as completed Sep 19, 2024
@oeyh oeyh added enhancement New feature or request and removed untriaged labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
2 participants