fromgroupdocs.redaction.redactionsimportAnnotationRedaction# Redact the word "approved" (case‑insensitive) and replace it with "[REVIEW]"redaction=AnnotationRedaction("(?i)approved","[REVIEW]")
init
Initializes a new AnnotationRedaction instance.
def__init__(self,regex,replacement):...
Parameter
Type
Description
regex
System.Text.RegularExpressions.Regex
Regular expression to match.
replacement
str
Textual replacement for matched text.
Example
fromgroupdocs.redaction.redactionsimportAnnotationRedaction# Redact the word "approved" (case‑insensitive) and replace it with "[REVIEW]"redaction=AnnotationRedaction("(?i)approved","[REVIEW]")