Skip to content
Private Preview
Join Waitlist →

Custom Patterns

Teach Redactorr to detect your organisation-specific data

4 min readAuthor: Redactorr Support Team · [email protected]Last reviewed: March 2026

Outcome

Create and test a custom detection pattern for an internal format using fake examples before relying on it in real documents.

Your progress

Mark each step as you complete it. This is saved only in this browser.

0 / 3 steps complete

Before you start

Know the internal format you want to detect, such as customer ID, project code, serial number, or proprietary key prefix.
Prepare fake positive and negative examples.
Do not use live customer, employee, patient, or client values while testing a pattern.

Visual frame

Review asset

Custom patterns storyboard

Synthetic custom-pattern frame only. It uses fake identifiers and avoids publishing private internal formats in examples.

PurposeName the target
TestFake cases first
RolloutManual first run

Synthetic frame

Pattern purpose

Start with the value type, not the expression.

TargetSupplier ID
Fake exampleSUP-TEST-001
Live exampleDo not use
A useful pattern begins with a clear target and safe examples.

Custom pattern builder frame

A safe test-first pattern workflow using fake values before real documents.

DescribeWrite the format in plain language.
TestUse fake examples and non-examples.
ReviewVerify first real matches manually.

Guided steps

Follow the task, then check the result.

Write the format in plain language

Describe what the value looks like before writing a pattern expression. Include the prefix, number of characters, separators, and examples that should not match.

Plain-language format notes beside fake match and non-match examples.
Success check: You have at least two fake matches and two fake non-matches.

Test the pattern with fake data

Create the pattern and run it against your fake examples. Fix over-matching before using it on real material.

Pattern tester with pass, fail, over-match, and missed-match states.
Success check: The pattern catches fake sensitive examples and ignores fake safe examples.

Enable it, then review the first real output carefully

After enabling the pattern, use it on a permitted document and review every match. A custom pattern is a review aid, not permission to skip review.

First real review with custom detections highlighted.
Success check: The first real review behaves the way your fake examples predicted.

Branch questions

Completion check

You used fake examples before testing real material.
The pattern catches intended values and avoids obvious false positives.
You reviewed the first real detections instead of trusting the pattern blindly.

Support boundary

Support can use by default

  • Pattern shape using fake examples.
  • Whether the issue is over-match, under-match, save failure, or review mismatch.
  • No live sensitive sample values by default.
  • Intent ID
  • Article slug
  • App route
  • Browser and viewport

Requires your consent

  • User-written description
  • Email address
  • Explicit attachment
  • Redacted sample
  • Support bundle previewed to the user

Not collected by default

  • Raw original document text
  • Full local file paths
  • Pasted private content
  • Unmasked screenshots
  • Replay capture

Safe support summary

Copy a scrubbed handoff.

Redactorr KB support summary

Article: /knowledge-base/custom-patterns
Selected issue: A valid pattern cannot be saved or tested.
Playbook progress: 0/3 steps marked complete

Safe context to include:
- Pattern shape using fake examples.
- Whether the issue is over-match, under-match, save failure, or review mismatch.
- No live sensitive sample values by default.
- Intent ID
- Article slug
- App route
- Browser and viewport

Requires explicit consent:
- User-written description
- Email address
- Explicit attachment
- Redacted sample
- Support bundle previewed to the user

Do not include by default:
- Raw original document text
- Full local file paths
- Pasted private content
- Unmasked screenshots
- Replay capture

User note:
- Describe the step and symptom without pasting raw document text, secrets, files, or restoration material.

Article details

Custom Patterns: Teaching Redactorr Your Secrets

Redactorr comes with 3,000+ built-in detection rules for common sensitive data like emails, SSNs, and API keys. But what about your organisation's unique identifiers?

That's where custom patterns come in.

What Are Custom Patterns?

Custom patterns are rules you create to tell Redactorr: "This format is sensitive in our organisation, please detect it."

Examples:

  • Customer IDs: CUST-123456
  • Project codes: PX-2024-089
  • Internal employee numbers: EMP-2024-1089
  • Custom API keys: mycompany_sk_sample_live_abc123
  • Serial numbers: SN-A1B2C3D4

Creating Your First Custom Pattern

Go to Settings → Custom Patterns**

Click "Add Pattern"**

1 / 2

You'll see a form:

  • Name: What to call this pattern (e.g., "Customer ID")
  • Regex: The pattern to match (e.g., CUST-\d{6})
  • Category: What type of data (PII, Credentials, Custom, etc.)
  • Test: Sample data to verify your pattern works

Write Your Pattern**

1 / 1

If you're not familiar with pattern expressions, here's a quick primer:

SymbolMeaningExample
\dAny digit (0-9)\d\d\d matches "123"
\wAny word character\w+ matches "hello"
+One or more\d+ matches "123" or "4567"
{n}Exactly n times\d{4} matches "2024"
[A-Z]Any uppercase letter[A-Z]{2} matches "US"
.Any character... matches "abc" or "123"

Test Your Pattern**

1 / 1

In the "Test" box, paste sample data:

text
CUST-123456
CUST-999999
CUST-000001

Click "Test Pattern". Redactorr will show which strings match and which don't.

Save and Activate**

1 / 1

Click "Save". Your pattern is now active and will be included in all future detections.

Real-World Examples

Customer Account Numbers

Format: ACC-YYYY-NNNN Pattern expression: ACC-\d{4}-\d{4} Matches: ACC-2024-1089, ACC-2023-5678 Doesn't Match: ACC-24-01, ACCT-2024-1089

Project Codes

Format: PX-YYYY-NNN Pattern expression: PX-\d{4}-\d{3} Matches: PX-2024-001, PX-2025-456 Doesn't Match: PROJECT-2024-001, PX-24-1

Internal Email Format

Format: [email protected] Pattern expression: \w+\.\w+\.\d+@company\.com Matches: [email protected] Doesn't Match: [email protected] (no employee ID)

Serial Numbers

Format: SN-XXXXX (5 uppercase letters/digits) Pattern expression: SN-[A-Z0-9]{5} Matches: SN-A1B2C, SN-99999 Doesn't Match: SN-abc12 (lowercase), SN-123 (too short)

Advanced: Optional Validation

For extra accuracy, you can add a JavaScript validator function:

javascript
function validateCustomerId(value) {
  // Extract the number part
  const match = value.match(/CUST-(\d{6})/);
  if (!match) return false;

  const num = parseInt(match[1]);

  // Customer IDs must be between 100000 and 999999
  return num >= 100000 && num <= 999999;
}

This ensures "CUST-000001" (invalid) isn't detected, but "CUST-123456" (valid) is.

Managing Your Patterns

Edit: Click any pattern to modify its expression or name Disable: Toggle off patterns you don't need right now (keeps them for later) Delete: Remove patterns you'll never use again Export: Download all your custom patterns as JSON (for backup or sharing with team) Import: Load patterns from a JSON file

Team Sharing

If your whole team needs the same custom patterns:

Create patterns on your account

Click "Export Patterns"

Share the JSON file with your team (via Slack, email, etc.)

They click "Import Patterns" and upload the file

1 / 4

Now everyone has the same detection rules.

Pro Tips

Start Simple Don't try to match every edge case on your first try. Start with the core pattern and refine as you test.

Use Test Data Keep a file of sample IDs to test against. This helps verify your pattern works before deploying.

Category Matters Assign the right category. "PII" shows up in red (high severity), "Custom" in blue (low severity).

Version Control Export your patterns regularly. If you break a pattern expression, you can restore from backup.

Combine with Whitelisting If your pattern is too broad and catches test data, whitelist the test patterns (like "CUST-000000").

Still stuck?

Copy a safe article handoff.

Start support with the article, the issue, and safe context. Raw document text, files, restoration material, and unredacted screenshots stay out unless you explicitly choose otherwise.

Support can start here
  • Article slug
  • Selected issue
  • Screen name
  • Action name
Redactorr support case

Source: Article playbook: custom-patterns
Route: /knowledge-base/custom-patterns
Selected issue: A valid pattern cannot be saved or tested.

Safe context:
- Pattern shape using fake examples.
- Whether the issue is over-match, under-match, save failure, or review mismatch.
- No live sensitive sample values by default.
- Article slug
- Selected issue
- Screen name or article section
- Action name
- Browser and viewport

Only include with explicit consent:
- User-written description
- Email address
- Explicit attachment
- Redacted sample
- Support bundle previewed to the user

Do not include by default:
- Raw original document text
- Full local file paths
- Pasted private content
- Unmasked screenshots
- Replay capture
- Hidden diagnostic uploads

User note:
- Describe what you tried and what happened. Do not paste raw document text, secrets, files, restoration material, or unredacted screenshots.

Support case builder

One case format, wherever you start.

This is the same support case shape used by diagnostics and article handoffs.

Safe to include
  • Pattern shape using fake examples.
  • Whether the issue is over-match, under-match, save failure, or review mismatch.
  • No live sensitive sample values by default.
  • Article slug
  • Selected issue
  • Screen name or article section
Consent boundary

Private material belongs behind an explicit consent step, not in the initial case.

6 default exclusions

Before you copy0/4 ready
Open safe support guide