Package org.approvej.scrub
Class RegexScrubber.RegexScrubberBuilder
java.lang.Object
org.approvej.scrub.RegexScrubber.RegexScrubberBuilder
- Enclosing class:
RegexScrubber
Builder for creating a
RegexScrubber.-
Method Details
-
with
Create aScrubberto replace any match of thepatternwith the result of the given replacementFunction.- Parameters:
replacement- a function that receives the finding index and returns the replacement string- Returns:
- a
RegexScrubberto replace any match of thepatternwith the result of the given replacementFunction.
-
with
Creates a newScrubberto replace any match of thepatternwith the given static replacement.- Parameters:
staticReplacement- the static replacementString- Returns:
- a new
RegexScrubberto replace any match of thepatternwith the given staticReplacement.
-
withNumberedReplacement
Creates a newScrubberto replace strings matching thepatternwith a numbered replacement.- Returns:
- a new
RegexScrubberusing theRegexScrubber.NUMBERED_REPLACEMENT.
-