Regex Tester
Try a regular-expression pattern and flags against sample text before putting it into code. Matching results are capped so a large input cannot flood the page.
StatusValid regex
Matches4
| # | Match | Index | Capture groups |
|---|---|---|---|
| 1 | Crunch | 0 | — |
| 2 | Anything | 7 | — |
| 3 | Test | 20 | — |
| 4 | Regex | 25 | — |
How this tool works
The browser compiles a JavaScript RegExp and iterates global matches, recording each matched substring, index and capture groups.
Example
Use \b[A-Z][a-z]+\b with the g flag to find capitalized words and inspect where each match begins.
Common questions
Which regex flavor is used?
The tool uses the JavaScript regular-expression engine provided by the browser.
Why are results capped?
A result limit keeps accidental broad patterns from creating thousands of table rows in the page.