Polymorpher
The Utility Factory — Free Developer Tools
Convert, transform, beautify & decode — all in one place.
⚡ All Tools
Did You Know?
Select a tool from the sidebar to get started, or explore our free developer utilities.
About this Tool
Regex Tester & Pattern Matcher
Test regular expressions against any text and see all matches instantly with detailed results including match index, length, and captured groups. Supports named and numbered capture groups with timeout protection for complex patterns.
Features include: multiple match highlighting, detailed error messages for invalid regex syntax, and a built-in regex cheat sheet via the reverse transform. Supports the full .NET regex flavor including lookaheads, lookbehinds, and Unicode categories.
Perfect for building and debugging regex patterns for data validation, text parsing, email matching, URL extraction, and search-and-replace operations. Free online regex tester with no ads.
Live Examples
Example 1 — Extract email addresses
Pattern (line 1): [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Test text (line 2+): Contact us at [email protected] or [email protected]
Output:
Match 1: "[email protected]" (index 17, length 19) Match 2: "[email protected]" (index 40, length 19)
Example 2 — Capture groups for date parsing
Pattern: (\d{4})-(\d{2})-(\d{2})
Test text: Created: 2026-04-06, Updated: 2026-04-07
Output:
Match 1: "2026-04-06" (index 9, length 10) Group 1: "2026" Group 2: "04" Group 3: "06" Match 2: "2026-04-07" (index 30, length 10) Group 1: "2026" Group 2: "04" Group 3: "07"
Example 3 — Validate phone numbers
Pattern: \+?\d{1,3}[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}
Test text: Call +1 (555) 123-4567 or 555.987.6543
Example 4 — Lookahead: password strength check
Pattern: ^(?=.*[A-Z])(?=.*\d)(?=.*[!@#$]).{8,}$
Matches strings with at least one uppercase letter, one digit, one special character, and a minimum length of 8.
Input Format
The first line is your regex pattern. Everything from the second line onward is the test text:
your-regex-pattern-here The text to test against goes here. It can span multiple lines.
Features
- Full .NET regex flavor (lookaheads, lookbehinds, Unicode categories, backreferences)
- Numbered and named capture groups shown for each match
- 2-second timeout protection against catastrophic backtracking (ReDoS)
- Built-in cheat sheet via the reverse/swap button
When to Use
- Building validation patterns for forms (email, phone, date)
- Extracting structured data from log files or text
- Debugging complex regex patterns before using them in code
- Learning regex with instant visual feedback
When Not to Use
- HTML/XML parsing: Use a proper parser — regex cannot handle nested tags reliably
- JavaScript-specific syntax: This tester uses .NET regex, which has minor differences from JavaScript regex (e.g., named groups use
(?<name>)syntax)
Related Tools: Code Beautifier · JSON to Classes · URL Encoder