Regex Tester

Write a regular expression, paste some sample text, and watch every match light up live with its capture groups.

Regular expression

Flags

Test text

How to test a regular expression

  1. Type your regular expression into the pattern field.
  2. Add flags like g, i, m or s if you need them.
  3. Paste the text you want to test against.
  4. Read the highlighted matches and their capture groups below.

FAQs

What do the flags g, i, m and s mean?

g finds every match instead of just the first, i makes matching case-insensitive, m makes ^ and $ match at each line, and s lets the dot match newlines.

What are capture groups?

Parts of your pattern wrapped in parentheses are capture groups. They let you pull out just the piece of a match you care about, and they are listed below every match.

Why does my pattern show an error?

The pattern or flags are not valid JavaScript regular expression syntax. The error message under the field explains exactly what is wrong.

Is the Regex Tester free?

Yes. Every Handio tool is free and runs entirely in your browser, so your pattern and text never leave your device.

Related Tools

Why test a regex in your browser?

A regular expression that works on your first guess is rare. Seeing matches highlighted instantly makes it obvious whether your pattern is too greedy, too narrow, or catching the wrong text.

Tips and Limits

This tester uses JavaScript regular expression syntax, which matches most engines but can differ slightly from Python or PCRE. Everything runs locally in your browser, so your text is never uploaded.