Local data workspace
JavaScript Regex Tester
Test JavaScript regular expressions with live match highlighting, flags, capture groups, indexes, replacement preview, presets, and copyable results.
No upload · No account · Runs in this browser · Updated 2026-08-03
JavaScript RegExp workspace
Ready
| # | Range | Full match | Capture groups |
|---|
Engine
Actual JavaScript syntax
This uses the browser's RegExp engine, including lookarounds, named capture groups, Unicode mode, and JavaScript replacement tokens.
Debugging
See every useful detail
Inspect match ranges, full matches, numbered and named groups, highlighted source text, and the replacement result. Results are capped at 200 rows.
Safety
Stop runaway patterns
Catastrophic backtracking can freeze an ordinary page. This tester isolates evaluation and terminates work that exceeds the time limit.
FAQ
Which regex syntax does this use?
It uses JavaScript regular expression syntax because the test runs in the browser. The g, i, m, s, u, and y flags follow the capabilities of your browser.
Why are only some matches displayed?
The tool shows the first 200 matches to keep long inputs responsive. It also terminates a pattern that runs longer than 750 milliseconds.
Why did I get an empty-match warning?
Patterns such as .*? can match zero characters. That is sometimes intentional, but it often means the pattern is too broad for a practical search.
Can I paste private logs here?
The tool is designed for browser-side testing, but you should still avoid pasting secrets, tokens, private customer data, or production logs into any web page unless your rules allow it.