REGEXVAULT DOCUMENTATION
Quick Start
RegexVault is a curated library of regular expressions. Every pattern is checked for correctness, performance, and ReDoS risk before publication, and ships with the test cases behind it.
Browse the library
Visit /library to search and filter across all 417 patterns.
Copy a pattern
Click the copy button on any pattern card to copy the regex to your clipboard. All five engine implementations are public.
View the full implementation
Click into any pattern to see the full code implementation, test cases, edge cases, and engine-specific notes.
Test before deploying
Use the live tester on the homepage to validate regex patterns against your own test strings before copying them into your codebase.
API Reference
RegexVault provides a JSON API for programmatic access to the pattern library. It is live now, needs no key or account, and is rate limited per IP.
Returns a paginated list of all patterns. Supports search and category filtering.
Query Parameters
q — Search query (fuzzy match on title, description, pattern)
category — Filter by category slug
limit — Results per page (default: 25, max: 100)
offset — Pagination offset
Returns a single pattern by its slug, including all language variants, test cases, and metadata.
Test a regex pattern against an input string. Returns match results plus the measured execution time. Pattern and input length are capped (2,000 and 10,000 characters); a run that measures over 100ms is reported back as a possible ReDoS signal. Note that this is a measurement taken after the fact, not an interrupt — JavaScript regex runs synchronously and a timer cannot cut it short.
Request Body (JSON)
pattern — The regex pattern string
flags — Regex flags (e.g., "gi")
input — Test string to match against
Submit a new pattern for review. Includes automated verification (schema validation, ReDoS detection, test case execution).
ReDoS Safety
Regular Expression Denial of Service (ReDoS) occurs when a crafted input causes a regex engine to enter catastrophic backtracking, consuming exponential CPU time. A single vulnerable regex in a web server can take down your entire application.
RegexVault takes ReDoS seriously. Every pattern goes through a two-phase check before it is published:
Static Analysis
Patterns are analyzed for known ReDoS-vulnerable constructs: nested quantifiers, overlapping alternations, and ambiguous repetition. Patterns with these "smells" are flagged for additional scrutiny.
Dynamic Stress Testing
Each pattern is run against adversarial inputs built to trigger worst-case backtracking, and the runs are timed. Submitted patterns measuring over 100ms on those inputs are rejected.
Patterns that clear both phases carry the REDOS CHECKED badge. A pattern that does not clear them is either left out of the library or published without the badge, flagged as a risk, with the specific concern written up in its audit notes. If a pattern page shows no badge, read those notes before you use it.
What the badge does not mean. These are checks, not a proof. Static analysis catches known backtracking shapes, not every one; the stress phase covers the adversarial inputs we generate, not the input your users will send. Backtracking behaviour also differs by engine — Go's RE2 has no catastrophic backtracking at all, while PCRE and the JVM do. Treat the badge as recorded evidence and test the pattern against your own data before pointing it at untrusted input.
Account Features
Public regex access does not require an account. Sign in with a magic link when you want saved patterns, dashboard history, or submission tracking.
All 5 Engine Implementations
JavaScript, Python, Go, Java, and PHP/PCRE are public for every pattern.
Bookmark Your Patterns
Save and access your most-used patterns from your account dashboard.
Submission Tracking
Review your submitted patterns and their current status.
Pattern Submission
RegexVault accepts community pattern submissions. Every submission goes through automated verification and manual review before publication.
Submit your pattern
Visit /submit and fill out the submission form with your pattern, test cases, and documentation.
Automated verification
Your pattern is automatically tested for schema compliance, ReDoS risk, and test case validity.
Manual review
Patterns that pass automated verification are queued for manual review.
Publication
Accepted patterns are enriched with multi-language implementations, documentation, and SEO metadata, then published to the library.