Test your regular expressions in real time. See matches, capture groups, and match indices as you type. Supports JavaScript regex syntax.
A regular expression is a pattern that describes a set of strings. It is used for pattern matching, text searching, and text manipulation. For example, the regex \d+ matches one or more digits.
This tool supports JavaScript regex flags: g (global - find all matches), i (case-insensitive), m (multiline), s (dotAll - dot matches newlines), u (unicode), and y (sticky).
Capture groups are portions of a regex enclosed in parentheses (). They capture the matched text so you can reference it later. For example, (\d{3})-(\d{4}) has two capture groups that match phone number parts.
Check that your pattern is correct, the flags are set properly (you may need the 'g' flag for multiple matches or 'i' for case-insensitive), and the test string actually contains text that matches your pattern.