Regex Tester and Explainer

Test JavaScript regular expressions safely with try/catch, inspect matches, and see basic token explanations.

Flags
Matches and explanation

        

How to use this tool

  1. Enter a regex pattern without surrounding slashes.
  2. Choose supported JavaScript flags such as g, i, m, s, u or y.
  3. 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