Build, validate, and debug regular expressions with instant syntax highlighting and capture group breakdowns.
All formatting, parsing, decoding, and validation executes entirely within your browser using modern Web APIs and JavaScript. Your tokens, JSON payloads, regex inputs, and queries never leave your computer.
Regular expressions (regex) are essential for parsing log lines, validating user inputs (emails, URLs, phone numbers), performing search-and-replace, and data extraction. Writing complex patterns with lookarounds, non-capturing groups, and quantifiers can be error-prone without instant visual feedback.
DevRef's Online Regex Tester compiles and runs your regular expression against sample text in real time. It highlights every match, details numbered and named capture groups, and warns you of invalid syntax or catastrophic backtracking patterns. Because testing often involves real customer logs or sensitive strings, evaluation executes entirely client-side.
This tool runs the modern ECMAScript (JavaScript) regular expression engine native to your browser, which supports lookahead, lookbehind, named capture groups, and unicode property escapes.
The global flag (g) finds all matches in the text rather than stopping after the first occurrence.
The multiline flag causes '^' and '$' anchors to match the start and end of each individual line instead of only the start and end of the entire string.
Never. Everything runs locally in your browser session. No data is sent to or stored on DevRef servers.
Quick reference for character classes, quantifiers, anchors, assertions, and boundary checks.
Production-ready patterns for emails, URLs, dates, semver strings, and UUIDs.
Command-line stream editing guide for file search and regex replacement on Linux and macOS.
Compare text before and after regex transformations side-by-side.