Skip to main content

PatternEntry

Type Alias PatternEntry 

Source
pub type PatternEntry = (&'static str, &'static str);
Expand description

Catalogue entry: (label, regex_source).

label is the upper-case identifier used in the [REDACTED:<LABEL>] replacement token. regex_source is intended to be compiled with case_insensitive(true) by consumers.

The BIC pattern pins case-sensitivity with an inline (?-i:…) group so it stays case-sensitive even under a case-insensitive builder. A BIC is pure uppercase letters; without the pin, [A-Z]{6}… matches any 8- or 11-letter word once the builder folds case. IBAN is left case-insensitive on purpose — its \d{2} guard prevents word false-positives, and lowercase IBANs should still be caught.