Online Regex Tester — Free Regular Expression Testing Tool
What is a Regex Tester?
Regular expressions (regex) are patterns used to match, search, and manipulate text. They're incredibly powerful but notoriously tricky to get right. A regex tester lets you write a pattern and instantly see what it matches in your test string, with highlights and match details.
Our Regex Tester supports all standard JavaScript regex features including capture groups, lookaheads, backreferences, and common flags.
Why Use Our Regex Tester?
- Live highlighting — Matches are highlighted directly in your test text
- Capture groups — See which groups were captured for each match
- Match positions — Each match shows its index in the string
- All JavaScript flags — Supports
g(global),i(case-insensitive),m(multiline),s(dotall),u(unicode)
Ad Unit #TOOL_ABOVE
Ad Unit #TOOL_BELOW
How to Use This Regex Tester
- Enter your regex pattern (without slashes)
- Set your flags (e.g.,
g,gi,gm) - Paste your test string in the textarea
- Matches are highlighted automatically
Common Regex Patterns
| Pattern | Matches |
|---|---|
\\d{3}-\\d{4} | Phone numbers like 123-4567 |
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,} | Email addresses |
https?://[^\\s]+ | URLs |
\\b[A-Z][a-z]+\\b | Capitalized words |
Frequently Asked Questions
Do I need to include the /slashes/ in my pattern?
No. Enter just the pattern body (e.g., \\d+). Our tool handles the regex construction for you.
What regex engine does this use?
JavaScript's built-in RegExp engine, which is the same engine used in all modern browsers and Node.js.
Are my test strings stored anywhere?
No. All matching happens in your browser. Your test data never leaves your device.