What is it?
The Regex Tester shows what a regular expression matches as you type: matches are highlighted, groups are listed, and a replacement can be previewed.
Who is it for?
Developers, data analysts and testers writing patterns for validation, search and replace, and students learning regular expressions step by step.
How to use it
- Type the Pattern (between / /) and the Flags.
- Paste the Test text. Matches are highlighted.
- Optionally fill in Replace with, such as
$1 at $2, to preview a replacement. Try a sample loads an example.
Flags
g: find all matches, not just the first.i: ignore capitals.m:^and$match at each line.s:.also matches line breaks.u: Unicode, needed for emoji and\p{L}(any letter, including Hindi).
Common problems
- Pattern error: an unclosed bracket or a lone special character. Put \ before . ? * + ( ) [ ] { } when you mean the character itself.
- Matches too much:
.*is greedy and runs to the last possible match. Use.*?. - Matches nothing: check capitals (add
i) and that^/$needmfor each line. - Works here but not in my code: this tester uses JavaScript regex. Python, PHP and Java differ slightly, for example in named groups and lookbehind.
Open the tool: Regex Tester
Still stuck?
Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.






























Questions, or an error not listed here?
Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.