data-prepper
data-prepper copied to clipboard
Adding 'single_word_only' option to obfuscate processor
Description
Adding single_word_only configuration option to obfuscate processor. When set to true a word boundary \b is added to the pattern, due to which obfuscation would be applied only to words that are standalone in the input text. By default, it is false, meaning obfuscation patterns are applied to all occurrences.
Issues Resolved
Resolves #4340
Check List
- [X] New functionality includes testing.
- [X] New functionality has a documentation issue. Please link to it in this PR.
- [ ] New functionality has javadoc added
- [X] Commits are signed with a real name per the DCO
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Thanks a lot @dlvenable for the review, I have addressed that comment also added a additional unit test testProcessorWithMultiplePatternsWithSingleWordOnly.