public class RegexRedaction extends TextRedaction
Represents a text redaction that searches and replaces text in the document by matching provided regular expression.
Constructor and Description |
---|
RegexRedaction(Pattern regex,
ReplacementOptions options)
Initializes a new instance of RegexRedaction class.
|
RegexRedaction(String pattern,
ReplacementOptions options)
Initializes a new instance of RegexRedaction class.
|
Modifier and Type | Method and Description |
---|---|
RedactorLogEntry |
applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
|
Pattern |
getRegularExpression()
Gets the regular expression to match.
|
getActionOptions
public RegexRedaction(String pattern, ReplacementOptions options)
Initializes a new instance of RegexRedaction class.
pattern
- Regular expression to search and replaceoptions
- Replacement options (textual, color)public RegexRedaction(Pattern regex, ReplacementOptions options)
Initializes a new instance of RegexRedaction class.
regex
- Regular expression to search and replaceoptions
- Replacement options (textual, color)public final Pattern getRegularExpression()
Gets the regular expression to match.
public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
Copyright © 2019. All rights reserved.