{
  "schema_version": 2,
  "rules": [
    {
      "name": "belgian_nrn",
      "description": "Belgian Numero de Registre National / Rijksregisternummer (YY.MM.DD-NNN.CC format)",
      "pattern": "\\b\\d{2}\\.\\d{2}\\.\\d{2}-\\d{3}\\.\\d{2}\\b",
      "flags": "",
      "checksum": "modulo_97_belgian_nrn",
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "iban",
      "description": "International Bank Account Number (2-letter country code + 2 check digits + up to 30 alphanumeric BBAN)",
      "pattern": "\\b[A-Z]{2}\\d{2}[\\s]?[A-Z0-9]{4}[\\s]?(?:[A-Z0-9]{4}[\\s]?){1,7}[A-Z0-9]{1,4}\\b",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "email",
      "description": "Generic email address pattern",
      "pattern": "\\b[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}\\b",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "eu_phone",
      "description": "European phone number with country code (+32, +33, +49, +31, etc.) in common formats",
      "pattern": "\\+(?:3[0-9]|4[0-9]|5[0-9]|2[0-9])\\s?(?:\\(?0?\\)?\\s?)?(?:\\d[\\s.-]?){6,12}\\b",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "international_phone",
      "description": "International phone number catch-all (E.164-like: + followed by 7-15 digits with optional separators)",
      "pattern": "\\+\\d{1,3}[\\s.-]?\\(?\\d{1,4}\\)?[\\s.-]?\\d{1,4}[\\s.-]?\\d{1,4}[\\s.-]?\\d{0,4}",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "us_ssn",
      "description": "United States Social Security Number (NNN-NN-NNNN format)",
      "pattern": "\\b\\d{3}-\\d{2}-\\d{4}\\b",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "uk_national_insurance",
      "description": "United Kingdom National Insurance Number (AA NNNNNN A or AA-NN-NN-NN-A format)",
      "pattern": "\\b[A-CEGHJ-PR-TW-Z]{2}[\\s-]?\\d{2}[\\s-]?\\d{2}[\\s-]?\\d{2}[\\s-]?[A-D]\\b",
      "flags": "i",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "direct_identifier"
    },
    {
      "name": "belgian_bce",
      "description": "Belgian BCE/KBO enterprise number (0NNN.NNN.NNN or 1NNN.NNN.NNN format)",
      "pattern": "\\b[01]\\d{3}\\.\\d{3}\\.\\d{3}\\b",
      "flags": "",
      "checksum": null,
      "applies_to_fields": "all_strings",
      "category": "indirect_identifier"
    }
  ],
  "checksum_algorithms": {
    "modulo_97_belgian_nrn": "Validate 11-digit NRN by verifying that the last 2 digits equal 97 minus (the first 9 digits read as integer, mod 97). Year prefix logic applies for post-2000 births: prepend 2 to the 9-digit base if validation against the original fails."
  }
}
