Custom Rules for Proprietary Data Formats
Custom RegEx Engine: Enforce Proprietary Data Boundaries

AI Summary / Key Takeaways
"Define your own corporate data protection perimeters. Add custom RegEx rules to instantly mask internal project names, proprietary IDs, and specific intellectual property directly inside the browser."
Enterprise-Grade AI Privacy
Add custom redaction rules and priority support with PRO.
Interactive PII Detection & Sanitization Sandbox
Test real-time client-side RAM tokenization. Choose a specialized preset or paste your own raw prompt to test instant reversible redaction.
The Challenge with AI Data Workflows
Standard PII scanners only look for generic data like emails and SSNs. However, the most devastating leaks in Generative AI often involve internal code names, proprietary UUIDs, and custom API token formats that off-the-shelf tools completely ignore.
How It Works
Define Pattern
Write custom regular expressions (supporting standard ECMAScript lookarounds) to target your specific company formats.
Choose Token
Assign a unique placeholder tag (e.g. [SECRET_PROJ]) to replace matched characters during scanning.
Sorted Execution
Rules are automatically sorted descending by length to prevent subset collisions and run locally in the Web Worker.
What Teams Achieve with Local PII Masking
Swipe to read verified reviews
Supported Formats & Limitations
Supported Formats
System Limitations
- Regex must be compatible with the JavaScript (V8) RegExp engine
- Avoid catastrophic backtracking patterns to prevent UI thread blocking
- Custom rules override default token mappings if conflicts occur
Custom Regex Rules: Catch What Generic Scanners Miss
Every organization has proprietary data formats that no generic PII scanner covers: internal employee IDs, policy numbers, claim references, API key formats. The Custom Rules engine lets you define ECMAScript regex patterns that run inside the same local detection pipeline as the built-in rules.
Regex Engine Capabilities
| Feature | Supported | Notes |
|---|---|---|
| Named capture groups | Yes | Used for display label in output |
| Lookaheads / lookbehinds | Yes | Full ECMAScript support |
| Flags (g, i, m) | Yes | Per-rule flag configuration |
| Custom token label | Yes | e.g. [ORDER_ID_1] vs [ID_1] |
| Cross-rule backreferences | No | Each rule is independent |
Enterprise Governance: Strict CISO Lock vs. Additive Local Overlay
Enterprise compliance requires a dual-track approach: IT security leads need to enforce non-negotiable corporate compliance baselines, while individual knowledge workers need the agility to sanitize ad-hoc project codenames and case IDs without filing IT tickets.
Corporate custom rules are marked with [ENTERPRISE LOCKED] in the employee's extension. Employees cannot edit, delete, or disable them. When Strict CISO Hard Lock is active, the extension master toggle is permanently locked ON.
Managed workers can add personal [LOCAL] regex rules directly in their Chrome extension popup. The engine merges [...corpRules, ...localRules] in real-time RAM, giving workers immediate protection with 0 IT ticket delay.
Step-by-Step: Creating a Custom Rule
- Go to the Custom Rules tab in the Secure Workspace (PRO required).
- Click New Rule. Enter a descriptive name (e.g., "Employee ID").
- Enter your regex pattern: e.g.,
EMP-\d{6} - Set the Token Label: e.g.,
EMP_IDproduces[EMP_ID_1]. - Paste a test string in the Live Preview panel. Matched text highlights in real time.
- Click Save Rule. Active immediately.
Syncing Custom Rules to the Chrome Extension
- In the Secure Workspace Custom Rules tab, click Export Rules. Generates an AES-GCM-256 encrypted JSON file.
- Open the extension popup. Go to Settings → Import Rules.
- Upload the exported file. Extension decrypts it using your PRO session key and loads all custom rules.
- Rules are now active on all supported AI platforms: ChatGPT, Claude, Gemini, DeepSeek, and more.
Development teams building sanitized log pipelines for AI debugging use custom rules extensively for proprietary token formats, internal error codes, and service mesh identifiers that no generic scanner covers.
Enterprise deployments can configure hardcoded rulesets that cannot be modified by end users — a key control requirement for SOC 2 Type II audit trails where rule consistency must be demonstrable.
Client-Side Reliability & Audit Verification
Powered by the Zero-Trust Sanitization Engine (ZTDS). All detection, tokenization, and regex evaluation execute 100% inside your local client process boundary — eliminating cloud proxies, intermediate servers, and third-party data retention risks.
Step-by-Step Guide
How to use this feature
Open Custom Rules panel
In the PrivacyScrubber sidebar, click Custom Rules. This is a PRO feature — upgrade if prompted.
Add a new rule
Click + Add Rule. Enter a rule name (e.g., Employee ID), your regex pattern (e.g., EMP-\d{6}), and a replacement token (e.g., [EMP_ID]).
Test your pattern
Paste a sample text containing your target pattern into the test field. Click Test to verify the regex matches correctly before saving.
Save and activate
Click Save Rule. The rule is immediately active — all future scrubs apply your custom patterns first, sorted by length to prevent overlapping matches.
Export your ruleset
Click Export Rules to download your custom ruleset as JSON. Share it via TEAMS session handoff for consistent redaction across your entire organization.
Frequently Asked Questions
Do I need to know regex to create custom rules?
No. The interface provides 40+ pre-built templates for common enterprise formats (order IDs, policy numbers, employee IDs, etc.). You can test any pattern against sample text in the live preview panel before saving. For advanced users, full ECMAScript regex syntax is supported including lookaheads and named capture groups.
Are custom rules stored on a server?
No. Custom rules are stored in your browser's localStorage, namespaced to your PRO session token. They are never transmitted to any server. localStorage is persistent across page refreshes but isolated per browser profile.
What happens when two rules match overlapping text?
The engine resolves overlaps deterministically: rules are sorted by match length (longest match wins). If two rules match the exact same character range, the rule with higher specificity takes precedence. No character is replaced twice.
Can I share custom rules with my team?
Yes. TEAMS subscribers can export the entire ruleset as an AES-GCM-256 encrypted JSON file. Any team member with an active TEAMS session can import it. Only authorized members can decrypt it, as the key is derived from the team's subscription ID.
Does the Chrome extension use my custom rules?
Yes. When you activate PRO in the extension popup, your custom rules are imported via the Export/Import flow (Settings → Import Rules). The extension then applies them to all text scrubbed on any supported AI platform.
Can custom rules use regex flags like case-insensitive?
Yes. The engine supports global (g), multiline (m), and case-insensitive (i) flags per rule. Named capture groups are supported for display labeling in the output. Backreferences within a single pattern work. Cross-rule backreferences are not supported.
Protect Your Team's AI Prompts in Under 30 Seconds
No server uploads. No account required. 100% offline in your browser's local RAM.
