/.*/
Regex Tester
Test a regular expression against text live, see the matched groups, try replace mode, and get a step-by-step explanation of the pattern.
/
/
Test string
1
Result
This tool runs entirely in your browser and uses JavaScript's standard regular expression engine (ECMAScript); for other languages (PCRE in PHP/Python, etc.) some syntax may differ slightly. The "Explain pattern" section is a rule-based analysis of your regex's structure, not an actual execution of it.
ABOUT
Live regex tester with match and group highlighting
Writing a regular expression without instant feedback is error-prone. This tool runs your pattern live against your text, highlights matches and capture groups, lets you toggle flags (g, i, m and more) and previews replacements. The engine is the JavaScript regex engine of your browser.
HOW TO
How to use it
- Write the pattern between the slashes and pick flags.
- Paste sample text and watch matches highlight.
- For replacements, write the replacement using
$1,$2and see the preview.
FAQ
What is the difference between
Frequently asked questions
What is the difference between .* and .*??
.* is greedy and takes as much as it can; .*? is lazy and stops at the shortest match.Is this the same as PCRE?
No, it is the JavaScript engine. Some PCRE features may behave differently.