Skip to content
  1. Home
  2. Developer
  3. Regex Tester

Regex Tester

Enter a regular expression and some text to see exactly what matches.

How it works

Type a pattern, optional flags such as i for case-insensitive, and the text to test. Press Test to list every match. The tool uses your browser’s JavaScript regex engine, so results match what RegExp does in JavaScript and Node.

Syntax errors are reported with the engine’s message. Other languages such as Python, PCRE and Java differ in some features, so check lookbehind and named group syntax if you move a pattern.

Frequently asked questions

Which regex flavor is used?

JavaScript (ECMAScript). Patterns for other languages may behave differently.

Why do I only see whole matches?

The output lists the full text of each match. Capture groups are not shown separately.

Do I need the g and m flags?

Matches are always listed globally, so g is not needed. The m flag is pre-filled so ^ and $ match at the start and end of each line; clear it to match the whole text only.