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.
// 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
| Syntax | Assertion Type | Sample Regex | Match 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]6 | Matches 6 hex chars only if NOT preceded by "#" |
| (?:...) | Non-Capturing Group | (?:https|ftp) | Groups alternations without saving a match capture group |
Frequently Asked Questions
In-Depth Guides & Tutorials
Formulas, industry standards, and best practices for Interactive Regex Tester & Explainer.
Regex for Non-Programmers: Find and Replace on Steroids
Regular expressions look like alien scratch, but the core is learnable in 15 minutes. Learn the handful of symbols that cover 90% of real searches, with examples anyone can use.
JSONPath & XML XPath Query Cheat Sheet: Filter Private API Payloads Offline
Master JSONPath filter expressions, recursive descent, array slicing, and XML XPath selectors locally in your browser with zero API payload logging.
Testing REST APIs, Webhooks & CORS Preflight Headers Directly in Your Browser (Zero Cloud Proxy Guide)
Learn how browser Fetch API testing works without cloud proxy middlemen, how to diagnose CORS Access-Control-Allow-Origin errors on localhost and production APIs, and how to export requests to cURL, Fetch, Python, and Go.
Related Workflow & Next Tools
Continue seamlessly with zero-upload utilities built to pair with Interactive Regex Tester & Explainer.
Text & Code Diff Checker
Compare text, code, or JSON files side-by-side or inline with character-level diff highlighting. 100% private in-browser comparison.
UUID v1/v4/v7, ULID & NanoID Generator
Bulk-generate cryptographically random UUID v4, sortable UUID v7, UUID v1, ULID, and NanoID identifiers via WebCrypto and decode embedded timestamps.
Number Base & Bitwise Converter
Convert between Decimal, Binary, Hexadecimal, and Octal simultaneously with BigInt precision, two's complement, 8/16/32-bit masks, and ASCII decoding.
HTML Entity Encoder & Decoder
Encode and decode special characters into named HTML5 entities, decimal codepoints, and hexadecimal values with an interactive symbol lookup palette.