__init__ constructor

init

Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything).

def __init__(self):
    ...

Example

from groupdocs.redaction.redactions import DeleteAnnotationRedaction

# Delete all annotations
del_red = DeleteAnnotationRedaction()

init

Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.

def __init__(self, pattern):
    ...
Parameter Type Description
pattern str Regular expression.

Example

from groupdocs.redaction.redactions import DeleteAnnotationRedaction

# Delete annotations containing the word "internal" (case‑insensitive)
del_red = DeleteAnnotationRedaction(r"(?i)internal")

init

Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.

def __init__(self, regex):
    ...
Parameter Type Description
regex System.Text.RegularExpressions.Regex Regular expression.

Example

from groupdocs.redaction.redactions import DeleteAnnotationRedaction

# Delete annotations whose content matches the regex (case‑insensitive)
del_red = DeleteAnnotationRedaction("(?i)internal")

See Also