Safe Local Regular Expression Debugging

Testing log lines, authentication headers, or customer records on third-party regex backends risks leaking sensitive text. This tester uses your browser's native JavaScript RegExp engine completely offline—highlighting matches and counting capture groups as you type. Common flags: g (global match all), i (case-insensitive), m (multiline ^/$), and s (dot matches newline).

Essential JavaScript RegExp Flags & Pitfalls

FlagEffectWhen to Enable
gGlobal (find all matches)Extracting every URL, email, or log line
iCase-insensitiveUser-typed keywords or headers
mMultiline (^/$ per line)Parsing log files or CSV rows
sdotAll (. matches newlines)Matching multi-line blocks

Watch out for catastrophic backtracking (ReDoS): avoid nested quantifiers like (a+)+$ on untrusted user input.

Frequently Asked Questions

Which regex flavor does this tester run?
It executes your browser's native ECMAScript (JavaScript) RegExp engine locally.
Why doesn't ^ match the start of line 2?
Enable the multiline (m) flag so ^ and $ anchor to line breaks rather than only the start and end of the full text.
Are sensitive logs pasted into this tester sent anywhere?
No. All pattern matching runs strictly inside local browser memory.

Common tokens: \d matches digits, \w matches letters/numbers/underscore, + requires one or more, ? makes a quantifier lazy, and parentheses (...) capture substrings for replacement or extraction. Always verify edge cases like empty strings and multiline inputs before shipping patterns to production.