Real-Time Regex Engine • 100% In-Browser
Interactive Regex Tester & Pattern Generator
Test, debug, and inspect regular expressions with real-time match highlighting, pre-built pattern libraries, and instant code generation for JS, Python, and Go.
//
2 matches foundEvaluated in 0.36ms
Test String114 chars
Match Details (2)
Match #1Index: 14 (Len: 20)
Match #2Index: 38 (Len: 31)
Export Ready-to-Use Code Snippet
// JavaScript / TypeScript
const regex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/gi;
const text = `Contact us at [email protected] or [email protected] for support. Invalid: [email protected], test@domain`;
// Match all occurrences
const matches = [...text.matchAll(regex)];
matches.forEach((match, i) => {
console.log(`Match ${i + 1}: ${match[0]} at index ${match.index}`);
});Advertisement
Google AdSense Ad SlotHORIZONTAL (Auto-reserves space for 0 Cumulative Layout Shift)
Regular Expression (Regex) Quick Reference Cheat Sheet
Character Classes
.: Any character except newline\d: Any digit [0-9]\D: Any non-digit\w: Word character [a-zA-Z0-9_]\s: Whitespace (space, tab, newline)
Quantifiers
*: 0 or more times+: 1 or more times?: 0 or 1 time (optional){3}: Exactly 3 times{2,5}: Between 2 and 5 times
Anchors & Boundaries
^: Start of string (or line in /m)$: End of string (or line in /m)\b: Word boundary\B: Non-word boundary
Groups & Lookarounds
(abc): Capture group(?:abc): Non-capturing group(?=abc): Positive lookahead(?!abc): Negative lookahead
Frequently Asked Questions
Advertisement
Google AdSense Ad SlotRECTANGLE (Auto-reserves space for 0 Cumulative Layout Shift)