Developer Tools

Regex Tester

Test regular expressions with live matching, capture groups, and detailed match information.

How to use

Enter your regex pattern, optional flags (g, i, m, etc.), and test text. Click "Run Tool" to see all matches with their positions and capture groups.

Example pattern

Pattern: (\w+)@(\w+)\.(\w+)
Flags: gi

Example output

Found 1 match(es):

Match 1: "test@example.com" at index 32
  Group 1: "test"
  Group 2: "example"
  Group 3: "com"

FAQ

What regex flags are supported?

All JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), y (sticky).

How do capture groups work?

Use parentheses () in your pattern to capture parts of the match. Each group is numbered and shown in the results.

Is regex execution safe?

Yes, regex is executed in your browser. Be aware that some patterns can be slow on large inputs (ReDoS vulnerability).

Related tools