Regex Tester
Used 4,900 times
Write a pattern, pick your flags, and see matches highlighted in real time. Capture groups are listed in a table and each part of your regex is explained in plain English.
Latest Developer Tools articles
Bulk UUID Generator – Generate Hundreds of UUIDs for Test Fixtures
Learn how to generate batches of UUIDs for database seeding, test fixtures, and mock data. Covers UUID v4 and v7, output formats, and collision probability at scale.
HEX ↔ RGB ↔ HSL Color Converter
Convert colors between HEX, RGB, and HSL, build palettes, and ensure accessible contrast. Includes CSS snippets and WCAG guidance.
Compare API Responses Online – Debug Breaking Changes Between Versions
Learn how to compare REST API responses to find breaking changes, regressions, and contract violations. Covers JSON normalization, dynamic field handling, and API versioning workflows.
What is a Regex Tester?
A regex tester lets you write a regular expression and immediately see which parts of your test string it matches — without running code. This tool highlights every match inline, lists captured groups in a table, and explains each token in your pattern in plain English, making it easy to iterate on complex patterns.
How to Use
- Enter your pattern in the Pattern field (without delimiters).
- Toggle flags:
g(global),i(case-insensitive),m(multiline). - Paste your test string — matches are highlighted in real time.
- Use quick-insert buttons (Email, URL, IP, Phone) to load common patterns instantly.
- Check the capture groups table and the plain-English explanation below.
Common Regex Mistakes
- Forgetting the global flag — Without
g, only the first match is returned. - Unescaped special characters — Characters like
.*+?must be escaped with\when you mean the literal character. - Greedy vs lazy quantifiers —
.*matches as much as possible; append?(.*?) for a lazy (minimal) match. - Anchors missing — Without
^and$, the pattern can match anywhere inside a longer string.
FAQs
Which regex flavor does this use?
JavaScript's built-in RegExp engine (ECMAScript). Syntax is compatible with most modern languages but differs from PCRE in areas like lookbehind and named groups.
What does the multiline flag do?
With m, ^ matches the start of each line and $ matches the end of each line, rather than the start/end of the entire string.
Can I use named capture groups?
Yes. Use (?<name>pattern) syntax. Named groups appear alongside numbered groups in the capture groups table.