Regex Playground
Test JavaScript regular expressions. Inspect matches, positions and capture groups in your browser.
Paste a bare pattern or a JavaScript literal such as /hello/gi. Literal flags replace the flags field.
Ready to test.
Test text
49 / 20,000 charactersChange the text, then select Test expression.
Highlighted matches
Not testedRun the expression to see highlighted matches.
A vertical marker indicates a zero-width match.
Matches and capture groups
Test an expression to inspect its results.
How to use this playground
Enter a pattern and test text, choose the flags you need, then select Test expression. Use parentheses to capture parts of a match. Named groups use (?<name>…).
g finds all matches; i ignores case; m enables line anchors; s lets dot match newlines; u enables Unicode mode.
Limits and privacy
This uses your browser’s JavaScript RegExp engine, not PCRE. Supported syntax depends on the browser. Testing runs in a separate worker with a one-second execution limit, a 500-character pattern limit and a 200-match result limit. Indices and columns count UTF-16 code units; line and column numbers start at 1. Inputs are not uploaded or saved automatically.
Compare text · Open JSON Studio