Create Custom Detection Rules

Catch identifiers unique to your company with your own patterns: where to add them, what a custom rule is made of, how to write the regex (or generate it with AI), and worked examples.

The built-in detectors cover universal data (cards, keys, IBANs…). Custom rules let you catch identifiers that are unique to your company — employee IDs, internal project codes, customer reference formats.

Where to find them

Scroll to the Custom rules section at the bottom of the Rules page and click + Add. Custom rules are available on the Business and Enterprise plans.

What a custom rule is made of

  • Name — a label, for example Employee ID.
  • Pattern — a regular expression that describes what to match, for example EMP-\d{6}.
  • ModeAlert or Block.

How to add one

  1. Click + Add in the Custom rules section.
  2. Enter a Name.
  3. Provide the Pattern as a regular expression — or use Generate with AI: describe in plain words what you want to match (for example employee badge number) and Zeuslock writes the regular expression for you, with a short explanation.
  4. Choose a Mode (Alert or Block).
  5. Save. The pattern is validated first, so an invalid regular expression is rejected before it is saved.

Examples

  • Employee IDEMP-\d{6} (the letters EMP- followed by six digits).
  • Quad-Four4444.
  • Any Pakistani phone — a regular expression covering +92 and local formats.

Tips: keep patterns specific to avoid false positives, start a new rule on Alert and promote it to Block once you trust it, and note that your custom detections appear by name in the dashboard's Data types detected chart.