Skip to content

swift

swift

Classes:

Name Description
SWIFT

SWIFT regex pattern matcher based on https://en.wikipedia.org/wiki/ISO_9362.

SWIFT()

Bases: RegexPredictor

SWIFT regex pattern matcher based on https://en.wikipedia.org/wiki/ISO_9362. Matches are validated against the same list of country codes used for IBAN regex.

Labels are based on https://docs.microsoft.com/en-us/exchange/policy-and-compliance/data-loss-prevention/sensitive-information-types?view=exchserver-2019#swift-code # noqa

Examples:

{"bic#": "DEUTDEFF500"} {"迅速#": "NEDSZAJJXXX"}

Source code in src/nemo_safe_synthesizer/pii_replacer/ner/regexes/swift.py
def __init__(self):
    patterns = [
        Pattern(
            pattern=SWIFT_GENERIC_REGEX,
            header_contexts=LABELS,
            ignore_raw_score=True,
        )
    ]

    super().__init__(entity=Entity.SWIFT_CODE, patterns=patterns)