CleverCat mascot: a cat engineer with a hard hatCleverCat.CC

Home / Developer tools / Regex Tester

Regex Tester

Regular expressions are quicker to test than to reason about. Type a pattern and some sample text: every match is highlighted as you type, with a count and the contents of any capture groups.

How to use it

  1. Enter the pattern, without the surrounding slashes.
  2. Set flags — g for all matches, i to ignore case, m for multiline.
  3. Paste sample text and watch the highlights update.

Examples

Questions people ask

Which flavour of regex is this?

JavaScript's, the same one you get in the browser and in Node. Most basic syntax is shared with Python, PHP and Perl, but lookbehind support and some named-group syntax differ, so verify anything unusual in your target language.

Why is my pattern slow or stuck?

Nested quantifiers such as (a+)+ can cause catastrophic backtracking, where the engine explores an exploding number of paths. Make the inner parts more specific, or anchor the pattern, to keep it linear.

Related tools

Updated: 2026-08-07