Regex Tools
Test, replace, and visualize regular expressions with match highlighting and explanation.
20 tools available, all running locally in your browser.
- Regex ComplementCompute the true complement of a regex language — every string it does not fully match — as a ready-to-use ^...$ pattern, via DFA inversion with minimization, in your browser.TOOL
- Regex ContainsRegex Contains — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex DifferenceBuild a regex for 'strings matching pattern A but not pattern B' from two patterns, one per line. Semantics are asymmetric: A must match from the start of the string, while B is rejected if it occurs anywhere. Output shape: (?=A)(?!.*B).*TOOL
- Regex EquivalentCheck whether two regexes match exactly the same strings — semantic equivalence via product-DFA analysis, with a shortest counterexample string when they differ. Input: two patterns on separate lines.TOOL
- Regex Escape StringRegex Escape String — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex ExplainRegex Explain — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex Extract GroupsRegex Extract Groups — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex FuzzRegex Fuzz — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex GenerateGenerate sample strings that a regex fully matches — distance-guided sampling on its DFA (deterministic for the same pattern, empty language detected), all in your browser.TOOL
- Regex IntersectBuild a pattern matching any string that contains both A and B as substrings (lookahead AND). Input: two patterns on separate lines.TOOL
- Regex MinimizeSafely minimize a regex — removes only provably lossless constructs (redundant non-capturing groups, empty groups); capture groups are never touched and doubtful cases keep the original.TOOL
- Regex OptimizeRegex Optimize — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex Replace BatchRegex Replace Batch — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex Test BatchRegex Test Batch — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex to DFAConvert a regex to a DFA via subset construction — full transition table plus the minimized state count (Moore algorithm), computed entirely in your browser.TOOL
- Regex to NFAConvert a regex to a Thompson NFA with ε-transitions via formal construction — states, symbol and ε edges, start and accept states, computed entirely in your browser.TOOL
- Regex Unescape StringRegex Unescape String — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex UnionRegex Union — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex Validate PatternRegex Validate Pattern — pure client-side tool. Privacy-first, no server round-trip.TOOL
- Regex VisualizeRender a regex as a Thompson NFA state diagram in Graphviz DOT format — ε-transitions, branches and quantifier loops visible; paste into any graphviz renderer.TOOL