Regex Tester
Enter a regex pattern and a test string to see all matches highlighted inline. Supports flags (g, i, m, s, u), capture groups, and named groups.
Enter a pattern and test string to see matches.
Advertisement
Frequently Asked Questions
What regex flavour does this tool use?
This tool uses JavaScript's built-in RegExp engine, which follows the ECMAScript specification. Most common regex syntax works here, including lookaheads, named capture groups, and Unicode property escapes (with the u flag).
What do the flags do?
g (global) finds all matches instead of stopping at the first. i (case-insensitive) makes letter matching ignore case. m (multiline) makes ^ and $ match line boundaries. s (dotAll) makes . match newline characters. u (unicode) enables full Unicode support and Unicode property escapes.
What are capture groups?
A capture group is a part of a pattern wrapped in parentheses, e.g. (\w+). The text matched by each group is captured and shown in the match results below the test string. Named groups use the syntax (?<name>pattern) and are shown by name.