Test JavaScript regular expressions safely with try/catch, inspect matches, and see basic token explanations.
Flags
Matches and explanation
How to use this tool
- Enter a regex pattern without surrounding slashes.
- Choose supported JavaScript flags such as g, i, m, s, u or y.
- Paste test text and run the matcher.
Common mistakes
- Forgetting to escape backslashes when moving regex into a string.
- Using catastrophic patterns on very large text.
- Expecting PCRE-only syntax to work in JavaScript RegExp.
FAQ
Does this use eval?
No. It creates a RegExp object with try/catch.
Which regex engine is used?
The browser JavaScript RegExp engine.
Is the explanation complete?
No. It explains common tokens and patterns as a practical helper.
Related tools
Last updated: May 17, 2026