Developer tool

Regex Tester

Enter a pattern and flags, then test it against sample text — matches highlight live.

About the Regex Tester

The Regex Tester lets you try a regular expression against sample text and see matches highlighted instantly, along with capture groups. Developers use it to build and debug patterns for validation, search and text processing.

Regular expressions describe text patterns with special symbols: \d matches a digit, \w a word character, . almost any character, + one or more, * zero or more, and parentheses create capture groups. The tester uses JavaScript's regular expression engine, so syntax matches what you would use in the browser or Node.js. Flags such as g (global), i (ignore case) and m (multiline) change the behaviour.

How to use it

  1. Type the pattern in the Pattern field.
  2. Choose flags.
  3. Paste a test string.
  4. Read the highlighted matches and groups.

Tips and good to know

Frequently asked questions

Why does my pattern only find one match?

Add the g flag for all matches.

Is catastrophic backtracking possible?

Yes, complex patterns can freeze; simplify them.

Can I use lookbehind?

Supported in modern browsers.