Regex Tester
Test regular expressions with live match highlighting, capture group display, and common pattern presets.
Test regular expressions with live match highlighting, capture group display, and common pattern presets.
A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. Regular expressions are used in programming languages, text editors, and command-line tools to find, match, and manipulate text. They are essential for tasks like input validation, data extraction, search-and-replace operations, and log parsing.
This regex tester lets you write and test regular expressions against sample text in real time, with instant visual feedback showing exactly what your pattern matches.
Enter your regular expression in the pattern field and your test string in the text area below. Matches are highlighted in real time as you type. You can also view captured groups and their positions.
This tool supports standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll), and u (Unicode). Toggle them using the flag buttons next to the pattern input.
Capture groups are portions of a regex pattern enclosed in parentheses. They let you extract specific parts of a match. This tool displays each capture group separately so you can verify your pattern extracts the right data.