1 — Technical

Regex Tester

Write a regular expression, set your flags, and paste test text — matches are highlighted instantly. See match index, capture groups, and named groups. Runs entirely in your browser.

//g

Flags explained

The g flag finds all matches instead of stopping at the first. i makes the pattern case-insensitive. m makes ^ and $ match the start/end of each line. s (dotall) makes . match newlines too — useful for multi-line patterns.

Capture groups

Wrap part of your pattern in parentheses to capture it: (\w+)@(\w+) captures the local-part and domain separately. Named groups (?<name>pattern) give each capture a readable label and are accessible as properties on the match object.

Zero-width matches

Patterns like ^ (start of line), $ (end of line), and lookaheads/lookbehinds can match positions in the text without consuming characters. These are shown as empty-string matches — useful for assertions but easy to miss.

Explore more tools

View all tools