Package org.approvej.scrub
Class RegexScrubber
java.lang.Object
org.approvej.scrub.RegexScrubber
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRegexScrubber(Pattern pattern, Function<Integer, Object> replacement) Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern and replacementFunction. -
Method Summary
Modifier and TypeMethodDescriptionstringsMatching(String pattern) Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern.stringsMatching(Pattern pattern) Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern.
-
Constructor Details
-
RegexScrubber
Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern and replacementFunction.- Parameters:
pattern- the pattern matching the string to be scrubbed asStringreplacement- a function that receives the finding index and returns the replacement string- See Also:
-
-
Method Details
-
stringsMatching
Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern.- Parameters:
pattern- thePatternmatching the strings to be scrubbed- Returns:
- a
RegexScrubber.RegexScrubberBuilderwith the given pattern
-
stringsMatching
Creates aRegexScrubber.RegexScrubberBuilderwith the given pattern.- Parameters:
pattern- the pattern matching the string to be scrubbed asString- Returns:
- a
RegexScrubber.RegexScrubberBuilderwith the given pattern - See Also:
-
apply
-