Test regular expressions with real-time matching and capture groups. Everything runs in your browser — your data stays private.
Regular expressions are one of the most powerful tools in a developer's toolkit for pattern matching and text manipulation. This free regex tester lets you write a pattern, set flags, and instantly see all matches highlighted against your test string — complete with capture group details and match positions.
The tester supports all JavaScript regex flags including global, multiline, case-insensitive, and dotAll. Each match displays its position in the string and any captured groups, making it easy to debug complex patterns before using them in your code.
A regular expression (regex) is a sequence of characters that defines a search pattern. It's used for string matching, validation, and text manipulation in programming languages like JavaScript, Python, and Java.
Common flags include g (global — find all matches), m (multiline — ^ and $ match line boundaries), i (case-insensitive matching), and s (dotAll — dot matches newlines).
Capture groups use parentheses () to extract specific parts of a match. For example, the pattern (\d+)-(\d+) applied to "123-456" would capture "123" and "456" as separate groups.