Regex Tools, Pattern Library & Debugging Guides
Test regular expressions in the browser, inspect capture groups and flag behavior, escape literal input safely, start from reusable validation patterns, and debug the parts developers most often get wrong.
Regex Tester
Write any JavaScript regular expression, toggle flags, paste test data, inspect matches, and iterate with instant browser-side feedback.
Regex Patterns
Copy focused patterns only after testing them against positive and negative examples and reviewing their limitations.
Inspect the parts a generic tester hides
These focused tools handle distinct jobs: understanding capture values, comparing JavaScript flag semantics, and safely converting literal text into regex source. They complement the generic tester rather than creating duplicate tester pages.
Capture Groups
Inspect full matches, numbered groups, named groups, match positions, and optional capture indices in the JavaScript RegExp engine.
Regex Flags
Toggle JavaScript regex flags and see how global, case-insensitive, multiline, dotAll, Unicode, sticky, and indices behavior changes matches.
Regex Escape
Escape literal text for safe use as a regular-expression source, JavaScript RegExp constructor, or regex literal.
Common validation patterns with live test vectors
These are intentionally distinct validation jobs rather than keyword variants of the same page. Each reference includes a live line-by-line tester, known-valid inputs, known-invalid inputs, and the cases where regex is not enough.
UUID v4 regex
For UUID v4, use a whole-string pattern that fixes the third group to version 4 and restricts the first character of the fourth group to 8, 9, a, or b. A generic UUID-shape regex is not enough when the version matters.
IPv4 address regex
A useful IPv4 validation regex must constrain each octet to 0–255, not merely one to three digits. This version also avoids leading-zero forms such as 01 in order to keep the accepted representation unambiguous.
IPv6 address regex
IPv6 validation requires accounting for both eight-group full notation and multiple legal placements of the :: compression marker. A short “hex groups separated by colons” regex usually rejects valid compressed addresses or accepts too many groups.
ISO date (YYYY-MM-DD) regex
Use regex when you need to enforce the YYYY-MM-DD text shape. Use a date parser after the regex if you must reject impossible calendar dates such as 2026-02-31.
Semantic Version regex
A SemVer validator should require exactly MAJOR.MINOR.PATCH, reject leading zeros in numeric identifiers, and separately handle optional prerelease and build metadata. A loose \d+\.\d+\.\d+ pattern misses those rules.
URL slug regex
For a simple lowercase ASCII slug policy, require one or more alphanumeric segments separated by single hyphens. Generate or normalize Unicode and punctuation before validation rather than silently accepting arbitrary characters.
Hex color regex
CSS hex colors start with # and use exactly 3, 4, 6, or 8 hexadecimal digits. The four- and eight-digit forms include alpha; other lengths should be rejected.
Use the existing specialist guides instead of duplicate pages
Email, phone, URL, lookaround, debugging, replacement, and syntax already have dedicated FixTools routes. This hub consolidates those resources into one topical graph instead of creating competing URLs for the same search intent.
Regex Tester
Test any JavaScript regular expression with live matches and capture groups.
Regex Cheatsheet
Reference anchors, groups, character classes, quantifiers, flags, and common syntax.
Regex Debugger
Debug why a regular expression matches, misses, or over-matches text.
Lookahead & Lookbehind Tester
Work with positive and negative zero-width lookaround assertions.
Email Regex Guide
Test practical email validation patterns and their tradeoffs.
Phone Regex Guide
Test flexible and region-specific phone-number patterns.
URL Regex Guide
Test URL matching and validation patterns against realistic examples.
Regex Replace
Use capture groups and replacement strings for text transformations.
A practical regex workflow
Start with examples
Collect strings that must match and near-miss strings that must fail.
Write or select a pattern
Use the smallest pattern that represents the actual input constraint.
Inspect behavior
Check flags, captures, and negative cases rather than stopping at one happy-path match.
Know when to parse
Switch to a real parser when input has recursive structure or semantics regex cannot verify.
Regex questions
Where should I test a regular expression?
Use the FixTools Regex Tester for custom JavaScript/ECMAScript patterns and general matching. Use the Capture Group Explorer when you need to inspect groups, the Flags Lab when you need to compare flag behavior, and the pattern library when you want a tested starting pattern for a common structured value.
Are the regex pattern pages separate from the main tester?
Yes. The main tester is the flexible sandbox. Pattern pages focus on one validation job, include known-good and known-bad test vectors, and explain limitations before linking back to the full tester.
Which regex flavor does FixTools use?
The interactive regex tools use the browser JavaScript RegExp engine, so advanced syntax should be interpreted as ECMAScript behavior unless a page explicitly says otherwise.