public class RegexRedaction extends TextRedaction
Represents a text redaction that searches and replaces text in the document by matching provided regular expression.
Learn more
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.
|
String |
getDescription()
Returns a string, describing the redaction and its parameters.
|
Pattern |
getRegularExpression()
Gets the regular expression to match.
|
getActionOptions, getOcrConnector, processAsTextual, setOcrConnector
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 String getDescription()
Returns a string, describing the redaction and its parameters.
getDescription
in class Redaction
public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.