Enter a regular expression pattern and flags to highlight matches in your test string in real time
A regular expression (regex) is a notation for describing patterns in text. You write conditions such as "three digits in a row" or "something shaped like an email address with an @" as a pattern, then test whether a string matches it, or extract and replace the matching parts. Regexes are used widely for searching, input validation, log parsing, and more.
This tool uses the browser's built-in JavaScript (ECMAScript) regular expression engine (new RegExp) directly. It therefore supports the syntax JavaScript provides: character classes such as \d \w \s, quantifiers (* + ? {n,m}), grouping and capturing ( ), alternation (|), lookahead and lookbehind, and the g i m s u y flags. Some constructs specific to Perl or PCRE may not be available.
No. Matching of the pattern, flags, and test string happens entirely in JavaScript inside your browser. Your input is never sent to or stored on a server.