Regex Tester and Debugger
Live match highlighting, capture groups, replace preview and per-line testing. Nothing leaves your browser.
Stays on your device. This tool runs in your browser — nothing you paste or open ever leaves it. Nothing uploaded, nothing to leak.
↳ received from
Pattern
/
/
Test string
Capture groups (first 50 matches)
—
no capture groups in this patternReplace
Result
Tip: turn on the g flag to replace every match, not just the first.
Turn on Replace to preview a substitution — and chain the result straight into another tool.
Regex quick reference
. any character\d \w \s digit, word, space\D \W \S negated classes[abc] [^abc] set / not in set^ $ start / end\b word boundary* + ? 0+, 1+, optional{2} {2,} {2,5} counts(…) capture group(?<name>…) named group(?:…) non-capturea|b alternation(?=…) (?!…) look-ahead(?<=…) (?<!…) look-behind
Help us improve
Was this tool useful? Tap a star.
Thanks — your rating helps others find it.
A regex tester lets you write a regular expression and see exactly what it matches in your test text, in real time. TechWhack highlights every match as you type, breaks out each capture group in a table, previews your find-and-replace, and can test each line separately so you can see which inputs pass — all in your browser, so your data is never uploaded.
Why your pattern might not match
Most surprises come from flags and escaping. Without the global flag you only get the first match; without multiline, ^ and $ anchor to the whole string, not each line. Escape special characters (dot, star, plus, question mark) with a backslash when you mean them literally. The capture-groups table shows exactly what each set of parentheses captured, so you can see where a pattern drifts.
FAQ
What is the difference between greedy and lazy matching?A greedy quantifier like .+ grabs as much text as possible and backtracks, so it can swallow more than you intend; adding a question mark makes it lazy (.+?) so it matches as little as possible. Use lazy matching when you want to stop at the first delimiter, like extracting one quoted string.
What do the regex flags g, i, and m do?The g flag finds all matches instead of stopping at the first, i makes matching case-insensitive, and m makes the anchors ^ and $ match at the start and end of each line. You can toggle the flags and see the effect on matches live.
Which regex flavor does this tester use?It uses the JavaScript regex flavor, so syntax like named groups, lookahead, and flags behaves as it would in a browser or Node. Patterns that rely on features specific to other engines, such as some lookbehind or possessive quantifiers, may differ.
How do I see what each capture group matched?Matches are highlighted live and a capture-group table breaks out what each parenthesized group caught, with a replace preview to test substitutions. You can also test line by line, which helps when a pattern should match per row.
Is my pattern or test text uploaded anywhere?No. The matching runs in your browser, so your regular expression and sample text never leave your device. You can test against real log lines or data safely.