Regex Tester

Check a regular expression and see every match with its position and capture groups. Everything runs in your browser; nothing you enter is uploaded or stored.

  • Free, no sign-up
  • Runs in your browser
  • Verified
g all matches, i ignore case, m multiline, s dot matches newline, u unicode, y sticky, d indices.

How to use it

  1. Type a pattern (without the surrounding slashes).
  2. Set flags; use g to find all matches.
  3. Paste your test text and read the matches below.

How it works

The pattern runs with JavaScript’s own RegExp engine, so results match what you will get in JavaScript code in a browser or Node.js. Other languages (Python, PCRE, Java) differ in some features.

Matching runs in a background worker and is stopped after 2 seconds. That protects the page from patterns with catastrophic backtracking, such as (a+)+ on long text.

Examples

  • (\d{4})-(\d{2})-(\d{2}) with the g flag on “2026-11-22” returns group 1 = 2026, group 2 = 11, group 3 = 22.

Limitations

  • JavaScript syntax only. Lookbehind and named groups work where your browser supports them.
  • The test text is limited to 1,000,000 characters and 200 matches are listed.
  • A pattern that passes here can still be slow on other inputs; test with realistic data.

References

Last verified . See our Accuracy & Editorial Policy. Found a problem? Email [email protected].