Test and debug regular expressions live with instant match highlighting. Supports all JavaScript regex flags and shows capture groups.
ExperToolBox's regex tester lets you write, test and debug regular expressions with instant visual feedback. Type your pattern, paste your test string, and all matches are highlighted in real time as you type. No page refresh needed — results update instantly with every keystroke.
The tool supports all standard JavaScript regular expression flags: g (global), i (case insensitive), m (multiline), s (dotAll) and u (unicode). Toggle flags with the buttons or type them directly into the flags field. Capture groups from the first match are shown separately so you can verify your groups are working correctly.
Regular expressions (regex or regexp) are patterns used to match character combinations in strings. They're a fundamental tool in programming, used for validating input (email addresses, phone numbers, postal codes), searching and replacing text, extracting specific parts of strings (like dates or URLs from a document), and processing log files and data.
Regular expressions are supported in virtually every programming language — JavaScript, Python, Java, PHP, Ruby, Go, and more. While the syntax is largely similar across languages, there are differences in advanced features. This tester uses JavaScript's regex engine.
Some of the most commonly used regex patterns include: email validation ([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}), URL matching (https?:\/\/[^\s]+), date format (YYYY-MM-DD: \d{4}-\d{2}-\d{2}), and phone numbers (\+?[\d\s\-()+]{7,}). The quick reference panel in the tool above includes these and more — click any to insert it into the pattern field.