Ready. Enter a pattern and text, then click Run.
How to use
Enter a pattern and some test text, then run the checker.
- Type your regex in Pattern (without surrounding slashes).
- Select flags (like g for all matches, i for case-insensitive).
- Paste your text into Test text.
- Click Run to see matches, indices, and groups.
- Optional: enter a Replacement to preview
text.replace()output.
FAQ
Do I include the /slashes/ around my regex?
No—enter the pattern only. Use the flag checkboxes for g i m s u y.
Why do I only see one match?
Enable the g flag to collect all matches; otherwise JavaScript returns only the first match.
Does it show capture groups and named groups?
Yes—each match lists numbered groups, and named groups when your environment supports them.
Is this the same as PCRE/Python/.NET regex?
No—this tool uses JavaScript RegExp, so some syntax and features may differ from other engines.
Can I test replacements?
Yes—fill in Replacement to preview text.replace(regex, replacement) output.
Why is output truncated?
To keep the page fast, the tool caps matches and preview sizes; refine your pattern or reduce input length.
Why does my regex feel slow or freeze?
Some patterns can cause catastrophic backtracking on large inputs. Try simplifying the pattern or testing smaller text.