Regex Tester
About this tool
Test a regular expression against a string and see every match, its position, and any named capture groups.
How to use it
- Enter your regular expression pattern and any flags (g, i, m, s, u, y).
- Enter the string to test it against.
- See whether it matches, plus a full list of matches with their positions and capture groups.
Frequently asked questions
- Are there any input limits?
- Yes - the pattern is capped at 500 characters and the test string at 100,000 characters, which also caps the worst-case cost of unusually expensive patterns.
- What flags are supported?
- g, i, m, s, u, and y - the standard JavaScript regular expression flags.