Regex Tester Online Test, debug, validate, extract, and replace JavaScript regular expressions
Choose a common pattern for email, phone, URL, dates, or numbers, or write your own regex to inspect matches, capture groups, positions, and replacement output directly in the browser.
Frequently asked questions
What is a regex tester?
A regex tester is an online tool that lets you write a regular expression pattern, paste test text, and instantly see which parts of the text match your pattern.
Which regex engine does this tester use?
It uses the browser's JavaScript ECMAScript RegExp engine, the same style used in browser code and Node.js.
How do I test a regular expression online?
Enter the pattern, paste a test string, choose the flags you need, and review the live match preview, match count, positions, and capture groups.
Can I use capture groups in Replace mode?
Yes. Use $1, $2, and later group references in the replacement field to reuse captured values.
What do the regex flags g, i, m, s, and u do?
g finds all matches, i ignores case, m treats each line separately for ^ and $, s lets dot match newlines, and u enables Unicode-aware matching.
What is the difference between a match and a global match?
Without g, JavaScript stops after the first match. With g enabled, it scans the full string and returns every occurrence.
Why is my regex pattern not matching anything?
Common causes include missing flags, anchors that are too strict, unescaped special characters, case sensitivity, or a pattern that is valid but does not fit the test text.
Is my pattern or text uploaded?
No. Matching and replacement run locally in your browser.