Skip to content
MewixMewix

Regex tester

Enter a JavaScript pattern and flags, paste sample text, and press Check to see how many matches appear and the first fifty substrings that matched.

Updated by the Mewix team

JavaScript flavour, not PCRE

Patterns compile with the built-in RegExp constructor, so behaviour matches Chrome, Firefox, Safari, and Edge—not Python re or Perl extensions. Lookahead and Unicode property escapes work when the engine supports them; invalid syntax returns the parser error message instead of silent failure.

When counting matches, the tool ensures a global search: if you omit g from flags, it still runs a global pass internally so you see every occurrence, not just the first. At most fifty matched strings are printed to keep the panel readable on huge inputs.

Common flags in the Flags field

g finds all matches; i ignores case; m makes ^ and $ respect line breaks; s lets . span newlines; u enables Unicode mode; y sticky matching applies from lastIndex. Combine them in one string, e.g. gi, exactly as you would in source code.

Why do capture groups not show separately?
The listing shows full match text (index 0). Use a small script or devtools if you need group-by-group extraction.