Custom Patterns
Teach Redactorr to detect your organisation-specific data
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
Visual frame
Review asset
Custom patterns storyboard
Synthetic custom-pattern frame only. It uses fake identifiers and avoids publishing private internal formats in examples.
Synthetic frame
Pattern purpose
Start with the value type, not the expression.
Custom pattern builder frame
A safe test-first pattern workflow using fake values before real documents.
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.
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.
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.
Branch questions
Does the pattern mark values that should stay visible?
Does your team need the same pattern?
Completion check
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"**
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**
If you're not familiar with pattern expressions, here's a quick primer:
| Symbol | Meaning | Example |
|---|---|---|
\d | Any digit (0-9) | \d\d\d matches "123" |
\w | Any 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**
In the "Test" box, paste sample data:
Click "Test Pattern". Redactorr will show which strings match and which don't.
Save and Activate**
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:
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
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.
- 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.
- 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
Private material belongs behind an explicit consent step, not in the initial case.
6 default exclusions