RegEx Tester
Write and test regular expressions in real time. Enter your pattern and flags, paste a test string, and see every match with full capture group details.
FAQ
JavaScript's native RegExp engine - the same flavor used in browsers, Node.js, and most web contexts. Supports flags like g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode).
Wrap parts of your pattern in parentheses to create capture groups. Each match shows every group's value. Use (?:...) for non-capturing groups if you only need grouping without capturing.
g (global) finds all matches instead of stopping at the first. i (case-insensitive) ignores letter case. m (multiline) makes ^ and $ match start/end of each line. s (dotAll) makes . match newlines. u (unicode) enables full Unicode support. y (sticky) matches from lastIndex only.
Use regex when you need pattern matching (finding all emails, validating formats, extracting structured data from text). Use string methods (.includes, .startsWith, .indexOf) for simple substring checks — they're faster and more readable. Reserve regex for when you truly need pattern matching power.
JavaScript supports lookaheads (?=...) and (?!...) in all environments, and lookbehinds (?<=...) and (?
Catastrophic backtracking can cause slow matches. Avoid nested quantifiers like (a+)+b. Refactor your pattern to be more specific or use atomic groups where possible.
More tools
JSON Formatter
Pretty-print, validate, and minify JSON with syntax highlighting.
CSS Minifier
Compress stylesheets by stripping whitespace, comments, and redundant declarations.
JavaScript Minifier
Shrink JS payloads with intelligent minification while preserving functionality.
Diff Checker
Compare two text blocks side-by-side and see exactly what changed.
Base64 Encoder / Decoder
Encode or decode Base64 strings instantly.
URL Parser
Deconstruct any URL into its components.