Test, validate, and debug regular expressions in real-time. Features live capture group extraction, flags, preset libraries, and cheat sheets.
Regular expressions (regex) allow pattern matching and text parsing. Enter your pattern below with flags like g (global) and i (case-insensitive) to extract matches instantly directly in your browser with zero server transmission.
Regular expressions compile declarative pattern tokens into a deterministic finite automaton (DFA) or non-deterministic finite automaton (NFA) engine. In JavaScript, regex executes natively inside the V8 engine, evaluating characters, quantifier boundaries (+, *, {min,max}), and assertion anchors (^, $, \b).
[a-z] matches A-Z).^ and dollar $ behavior to match start and end of each individual line instead of the entire text string.. to match newline characters (\n).| Token | Description | Worked Example |
|---|---|---|
\d |
Matches any digit (equivalent to [0-9]) |
\d{3} matches "456" |
\w |
Matches alphanumeric word character + underscore | \w+ matches "user_2026" |
\s |
Matches whitespace (space, tab, newline) | \s+ matches multiple spaces |
[abc] |
Character set: matches any single character in brackets | [aeiou] matches any vowel |
[^abc] |
Negated set: matches anything NOT in brackets | [^0-9] matches non-digit characters |
(group) |
Capturing group: extracts subset match | (\d{4})-(\d{2}) extracts year and month |
Yes. The tester executes 100% client-side in your local browser JavaScript engine. Neither your regex pattern nor your test string is ever sent to any remote server or stored in any database.
This tool runs the ECMAScript / JavaScript regular expression specification, which is compatible with modern web browsers, Node.js, and closely mirrors PCRE (Perl Compatible Regular Expressions) and Python re.
Avoid nesting quantifiers such as (a+)+ or overlapping ambiguous alternation. When matching bounded tokens, use negated character classes (e.g. [^"]* instead of .*?).