Regular Expression Tester

Run a JavaScript regular expression against sample text, listing matches, positions and capture groups.

About this tool

How it works

  1. Inspect each matched substring and group; adjust flags or the pattern to avoid unexpected matches.
  2. Results are limited to 200 matches and 20,000 input characters. The tool searches globally and reports zero-based JavaScript string positions.

Enter the sample text, a JavaScript regex pattern such as \bcat\w*, and optional flags such as i for case-insensitive matching.

Example: cat cats scatter

Processed locally in your browser; nothing is uploaded.