Regex Tester
Test, debug, and compare regex patterns with live insights
Enter a pattern and input, then press Run to see results here.
How to test regex patterns online?
Test and debug regular expressions with our comprehensive regex tester. Validate patterns, test against sample text, and get detailed explanations. Features include syntax highlighting, match visualization, and support for various regex flavors.
Features
- Live match highlighting with groups and minimap
- Replace preview with capture groups
- Diff mode to compare engines and flags
- Performance metrics with timeout and cancel
How to use
- Type or paste your regex pattern and choose flags.
- Paste input text in the Input panel.
- Click Run to see matches, groups, and performance.
- Switch to Replace to preview replacements.
Tips & Best Practices
- You can paste text directly from any source — formatting will be preserved.
- Use the clear button to start fresh without refreshing the page.
- Large text inputs are supported but may take slightly longer to process.
- Copy the output directly to your code editor or document.
- All transformations happen instantly in your browser with no server roundtrip.
FAQ
Do you store my text?
No. Everything runs locally in your browser.
Can I share a test?
Yes. Use the share link to copy a permalink with state.
Do you support named capturing groups?
Yes. Named and numbered groups are extracted and listed with positions and values.
What is Safe Mode (RE2)?
A non-backtracking engine to avoid catastrophic patterns. Use it when reliability matters more than full features. All processing happens locally in your browser, ensuring complete privacy and data security for sensitive information.
Do you support PCRE2?
PCRE2 (WASM) is planned. Today the default engine is JavaScript RegExp; Diff mode will show engine differences.
How are very large inputs handled?
Processing runs in a Web Worker with timeouts, memory guards, chunked scanning, and Cancel to keep the UI responsive. The tool is engineered to handle both small and large inputs efficiently, leveraging modern browser capabilities for optimal performance.
Why do results differ between engines?
Engines implement different semantics (look behavior, Unicode, backtracking limits, sticky). Always verify with Diff.
How do I replace using groups?
Use $1, $2… for numbered groups and ${name} for named groups in Replace mode.
Is my data sent to any server?
No. Everything runs locally in your browser; nothing is uploaded.
Which flags are supported?
g, i, m, s, u, y. Availability might differ per engine in Diff mode.
How do I match across lines?
Use m to make ^/$ match line boundaries and s (dotAll) to let . match newlines.