Regex Tester

Test regular expressions with live match highlighting.

/ /
Matches
0
Matches will appear here...
# Match Index Groups
No matches yet.

What is the Regex Tester?

This free regex tester lets you write a regular expression and immediately see how it matches against any text you provide. Matches are highlighted in place, and a detailed breakdown shows each match's value, position, and any captured groups. Everything runs locally in your browser -- no data is sent to a server, and no account is required.

How to use it

Type or paste a regular expression into the pattern field. Enter your test string below it. The tool evaluates the expression as you type and highlights every match directly in the text. Toggle the flag checkboxes to control matching behaviour: g (global) finds all matches rather than stopping at the first, i makes matching case-insensitive, m treats each line as a separate string for ^ and $ anchors, and s allows the dot (.) to match newline characters.

Understanding the results

The match count shows how many times the pattern was found. The highlighted view marks each match with alternating colours so overlapping or adjacent matches are easy to distinguish. The details table lists every match with its index (the character position where it starts) and any named or numbered capture groups. If your pattern is invalid, an error message appears immediately, describing what went wrong.

Common use cases

Developers use regex testers to debug patterns before embedding them in code. It is much faster to iterate on a pattern visually than to run a script repeatedly. Writers and editors use regular expressions to find complex text patterns -- such as repeated words, malformed dates, or inconsistent formatting -- across large documents. System administrators rely on regex for log parsing, input validation, and search-and-replace operations. Students learning regular expressions benefit from the instant visual feedback, making it easier to understand how quantifiers, character classes, and grouping work in practice.

ectoplasma.org · Free tools for everyone.