Enter a pattern
Write the expression without slash delimiters and choose flags.
Run a regular expression against sample text in your browser and inspect every match locally.
The JavaScript engine checks your text in an isolated worker.
Write the expression without slash delimiters and choose flags.
Paste a sample into the editor; Ctrl/Cmd + Enter runs the test.
Check indexes, text and capture groups, or fix the reported error.
Test JavaScript regular expressions against sample text locally. The tool shows every match and its capture groups without sending your pattern or text to a server.
Use it while writing a JavaScript pattern, checking a validation rule or investigating why a pattern matches too much or too little. Enter the pattern without surrounding slashes, choose only the flags you need, and paste representative sample text.
The JavaScript engine applies the pattern and flags to your sample. The g flag finds all matches; without it, the first match is returned.
To find capitalised words, test \b([A-Z][a-z]+)\b with the g flag against Ada wrote code with Linus. The full matches are Ada and Linus, and capture group 1 contains each name.
Each result reports the matched text and its position. Numbered and named capture groups are listed with the match so you can verify which part of the pattern captured each value. A valid pattern with no results is different from an invalid pattern: no match is a legitimate outcome, while syntax errors are reported before execution.
For adjacent developer tasks, use the JSON Formatter & Validator, Unix Timestamp Converter or UUID & ULID Generator.
The pattern is valid, but it does not match the selected text and flags.
No. Testing runs locally in your browser.