Free Online Regex Tester & Debugger

Test JavaScript regular expressions against any string. See all matches, capture groups, and indices highlighted in real time. Supports all standard regex flags.

Related Tools

Presets:

Frequently Asked Questions

What regex engine does this tool use?

This tool uses the JavaScript (ECMAScript) regex engine, which supports standard features like character classes, quantifiers, groups, lookaheads/lookbehinds, and named capture groups. It does not support PCRE-specific features like atomic groups.

What are capture groups?

A capture group is a portion of a pattern wrapped in parentheses that extracts a sub-match. For example, in /(\d{4})-(\d{2})-(\d{2})/ applied to "2024-01-15", group 1 is "2024", group 2 is "01", and group 3 is "15".

What does the g flag do?

The global flag (g) makes the regex match all occurrences in the input rather than stopping after the first. Without g, test() and match() only return the first match.