Regex Tester
Run one JavaScript regular expression against the text you paste.
About this tool
The page compiles the pattern and walks the matches in the text. An invalid pattern is reported instead of a partial list.
It does not replace the text. Find and Replace is the page that writes a substitution.
How to use it
- Paste the text and the expression.
- Add flags if you need them.
- Test the expression. The page stops after 1000 matches.
Limitations
- The expression is JavaScript syntax. Another engine's extensions are not included.
- Matching stops after 1000 hits so a short pattern cannot list forever on a long text.
A global search with a hard match cap
The pattern is compiled, and the global flag is always present
The pattern is compiled with a global flag and run over the sample. Patterns longer than 200 characters are rejected before compilation. Flags may include only g, i, m, s, u, and y. Any other letter is an error. If you omit g, the page adds it, so the search continues through the sample instead of stopping after one hit. A broken pattern fails with the compiler’s error. It does not silently match nothing.
Matches are collected from the sample with a cap of 1000. Crossing that cap stops the run and asks you to narrow the pattern or the sample. Each kept match is printed as a numbered line of the whole match text. Capturing groups do not get lines of their own. If a group is part of the overall match, its characters are inside that line, not beside it. When nothing matches, the result is the sentence that there were no matches.
Empty matches stop on purpose
A pattern that can match an empty string stops after the first empty match. Without that stop, a global search would loop forever at the same index. The page will not list a thousand empty hits. If you wanted to find empty positions, this tester is a poor fit. Anchors, the multiline flag, and the dotall flag behave as they do in JavaScript, because the engine is the language’s regular expressions. There is no second dialect.
Replace lives on another page
This tester lists matches. It does not write the sample back with substitutions. Find-and-replace is the text tool that edits, and it has a literal mode that this page does not. There is no literal switch here: the pattern box is always a regular expression. A dot matches more than a period. Escape it when you mean a period. The sample is not stored. Change the pattern and run again to see a new list.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

