Guide: test regular expressions with highlighted matches
Validating emails, mining log IDs, or refactoring parsers means iterating regex against real samples. Testing only in app code requires deploys — here you see matches, capture groups, and flags (`g`, `i`, `m`) instantly.
Sample text and patterns stay in the browser; nothing is uploaded. Best for sanitized logs or synthetic form strings, not production PII.
Use for input validation, `.replace()` pipelines, or search filters. Watch for catastrophic backtracking on nested quantifiers before shipping.
Step by step
- Enter pattern and flags — Type the regex and enable global, case-insensitive, or multiline flags as needed.
- Paste sample text — Use log lines, URLs, or fake forms. Each match highlights with index and numbered groups.
- Inspect groups and replacement — Check `$1`, `$2` for chained replace. Use non-capturing `(?:…)` when you do not need the value.
- Move to code — Copy the escaped pattern into JavaScript `RegExp`, PCRE, or schema validators — test empty and Unicode edge cases.