Search tools

Search for a command to run...

Regex Tester

Test JavaScript regular expressions live — see every match highlighted, capture groups, named groups and match positions.

How to use

  1. 1Enter your pattern and flags (g, i, m, s, u).
  2. 2Paste test text; matches are marked with [brackets] and listed with their groups.

Frequently asked questions

Which regex flavor is used?

JavaScript (ECMAScript), as in browsers and Node.js. It supports lookbehind, named groups (?<name>…) and Unicode property escapes with the u flag.

Why does my pattern only find one match?

Add the g (global) flag to find all matches. Without it, JavaScript stops at the first one.

What does the m flag do?

Multiline mode: ^ and $ match at the start and end of every line instead of only the whole text.