Test and debug regular expressions in real time with instant match highlighting, capture group extraction, and detailed match information. This free online regex tester uses JavaScript's native RegExp engine and supports all flags including global (g), case-insensitive (i), multiline (m), dotAll (s), and unicode (u). Paste your pattern and test string to see matches highlighted instantly. All processing happens client-side — nothing is sent to a server.
RegExp engine — the same engine that runs in Chrome, Firefox, Node.js, and Deno. Capture groups are extracted and displayed with their index and position. All processing runs in your browser with zero server calls.g (global) — find all matches, not just the first. i (case-insensitive) — /abc/i matches "ABC", "Abc", etc. m (multiline) — ^ and $ match start/end of each line, not just the whole string. s (dotAll) — . matches newline characters (\n). u (unicode) — enables full Unicode support and proper handling of surrogate pairs.*, +, {n,}) match as much text as possible. Lazy quantifiers (*?, +?, {n,}?) match as little as possible. Example: on the string <b>hello</b>, the greedy pattern <.*> matches the entire string, while the lazy <.*?> matches only <b>. Use lazy quantifiers when you want the shortest possible match.^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$. This covers the vast majority of valid email addresses. The full RFC 5322 specification is extremely complex and nearly impossible to match with a single regex. For production applications, use a dedicated email validation library or send a confirmation email rather than relying on regex alone.() to extract specific parts of a match. For example, the pattern (\d{4})-(\d{2})-(\d{2}) on the string "2026-03-20" creates three groups: "2026", "03", "20". Named groups use (?<name>...) syntax for clearer code. Non-capturing groups (?:...) group patterns without capturing — useful for alternation like (?:cat|dog).