Regex Tester

Find JavaScript regular-expression matches with Unicode and global matching.

Your input is processed in this browser and is not uploaded.

Regex Tester

Find where a JavaScript expression matches text. A disposable worker bounds expensive execution rather than letting a difficult pattern run indefinitely in the page’s main context.

How to use it

  1. Paste the input text.
  2. Enter the pattern body without slashes; the fixed flags are gu.
  3. Select Run tool and inspect match text, indices and named capture groups in the JSON report.

Worked example

Pattern \b\w+\b against red green matches red at index 0 and green at index 4. Pattern (?<number>\d+) exposes the named group number when digits match.

Limits and troubleshooting

This uses JavaScript RegExp rather than PCRE or another language’s engine. Input is capped at 50,000 characters, patterns at 500 characters and output at 1,000 matches. Execution is stopped after one second. Match indices are UTF-16 offsets, not visible-character positions.

Frequently asked questions

Why does /pattern/i fail?

The field does not parse slash delimiters or custom flags. Supply only the pattern body; the tool uses gu.

Does timeout mean no matches?

No. The expression did not finish within its deadline. Simplify repetition or narrow the input before trying again.