Pattern
Uses the browser native RegExp engine, so results match exactly what your JavaScript will do.
Test text
Matches
0 foundNo matches in the current text.
Uses the browser native RegExp engine, so results match exactly what your JavaScript will do.
No matches in the current text.
Build and test regular expressions in your browser with instant feedback. See every match with position and capture groups, toggle flags, and try ready-made patterns for emails, UUIDs, dates and more.
Draft an email or UUID pattern, flip i/g as needed, and verify the capture group before it lands in a validation rule.
Build a pattern, switch to Per line, and confirm it isolates exactly the lines you want before wiring it into your log scanner.
Five ready patterns show ranges, repetition, groups and character classes working against the same sample data you can edit.
Only one match despite text containing severalWhy: The pattern lacks the g flag, so a non-global RegExp stops after the first match.
Fix: Toggle the g chip on and the count jumps to every occurrence.
^ and $ don't match per lineWhy: Those anchors bind to string start/end unless m (multiline) is set.
Fix: Add m, or switch to Per line mode which anchors each line for you.
Invalid escapeWhy: Patterns like \d\s written with single backslashes inside a string sometimes become doubled literals in JavaScript source.
Fix: In code, write String.raw`\d+` or double the backslashes; here, paste the pattern as the engine sees it.
It runs the browser's native RegExp engine on your exact pattern, flags and text. What you see here is precisely what JavaScript (Node or in-browser) will do — no interpreter mismatch.
Whole text matches against the entire block, honoring the m (multiline) and s (dotAll) flags exactly like RegExp.text.test(). Per line splits input into lines first and reports per-line match counts — handy for checking log files line-by-line where ^ and $ should anchor each line regardless of the m flag.
d (indices), g (global), i (ignore case), m (multiline), s (dotAll), u (unicode), v (unicodeSets, in modern engines) and y (sticky). Toggle them as chips; the engine validates them the way the browser would.
Without g (or y), a RegExp only finds the first match by design. The tool tells you the pattern is non-global and scans as if global for display purposes — but the global badge makes the semantic clear.
Yes. Each match lists its positional groups and named groups (like (?<name>…)), so you can verify what would actually be captured in your code before you write it.
No. Everything runs locally, so it's safe to test patterns against real config or log samples that contain sensitive data.
Last reviewed September 2026 · DataFormatter team — this tool processes data locally in your browser.