KitWharfFREEFast & Private Web Apps
Real-Time Visual Regex Engine • Substitution & Export

Interactive Regex Tester, Debugger & Substitutor

Test regular expressions with real-time in-text visual highlighting, capture group inspection, live regex substitutions, and 1-click dataset extraction.

Presets:
//
2 matches foundEvaluated in 0.16ms
Test String
Contact us at kitwharf@gmail.com or sales.inquiries@corp-global.com for support. Invalid: user@.com, test@domain
112 chars2 matches
Match Details (2)
Match #1Index: 14 (Len: 18)
kitwharf@gmail.com
Match #2Index: 36 (Len: 31)
sales.inquiries@corp-global.com
Export Ready-to-Use Code Snippet
// JavaScript / TypeScript
const regex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/gi;
const text = `Contact us at kitwharf@gmail.com or sales.inquiries@corp-global.com for support. Invalid: user@.com, test@domain`;

// Match all occurrences
const matches = [...text.matchAll(regex)];
matches.forEach((match, i) => {
  console.log(`Match ${i + 1}: ${match[0]} at index ${match.index}`);
});

Regular Expression (Regex) Quick Reference Cheat Sheet

Character Classes

  • . : Any character except newline
  • \d : Any digit [0-9]
  • \D : Any non-digit
  • \w : Word character [a-zA-Z0-9_]
  • \s : Whitespace (space, tab, newline)

Quantifiers

  • * : 0 or more times
  • + : 1 or more times
  • ? : 0 or 1 time (optional)
  • {3} : Exactly 3 times
  • {2,5} : Between 2 and 5 times

Anchors & Boundaries

  • ^ : Start of string (or line in /m)
  • $ : End of string (or line in /m)
  • \b : Word boundary
  • \B : Non-word boundary

Groups & Lookarounds

  • (abc) : Capture group
  • (?:abc) : Non-capturing group
  • (?=abc) : Positive lookahead
  • (?!abc) : Negative lookahead
SyntaxAssertion TypeSample RegexMatch Behavior
(?=...)Positive Lookahead\d+(?=px)Matches digits only if followed immediately by "px"
(?!...)Negative Lookahead\d+(?!%)Matches digits only if NOT followed by "%"
(?<=...)Positive Lookbehind(?<=\$)\d+Matches digits only if preceded by "$" without consuming the "$"
(?<!...)Negative Lookbehind(?<!#)[0-9a-f]6Matches 6 hex chars only if NOT preceded by "#"
(?:...)Non-Capturing Group(?:https|ftp)Groups alternations without saving a match capture group

Frequently Asked Questions

Next Step in Your Workflow

Related Workflow & Next Tools

Continue seamlessly with zero-upload utilities built to pair with Interactive Regex Tester & Explainer.

View all 134 utilities