Skip to content

How to Use Regex Tester

Test JavaScript regular expressions online with live match highlighting and flags. See every match in your sample text. Free regex tester for developers.

About this tool

Test JavaScript regular expressions against sample text and inspect matches.

How to use Regex Tester

  1. Enter the expression between the displayed slash delimiters.
  2. Choose flags such as global, ignore case or multiline and paste Test string.
  3. Review Highlighted matches, match totals and Match details.

Worked example

Try a short digit-matching pattern on text containing two numbers, then toggle the global flag.

Will this match another regex engine exactly?

Not necessarily. Syntax and Unicode handling vary by language; this tool uses the browser’s JavaScript engine.

Can a pattern freeze the browser?

Very complex or backtracking-heavy patterns can be slow. Test a small sample before increasing input size.

Put this guide into practice

  • Regex Tester — Test regular expressions with live match highlighting and groups.

Explore Coding Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help