Reading a regular expression
A regular expression is a compact pattern for matching text. The engine scans your input left to right, trying to align the pattern against each position — literals match themselves, character classes like \d or [a-z] match sets, and quantifiers like +, *, and {2,4} control how many times.
Two features do most of the heavy lifting. Anchors (^, $, \b) pin a match to a boundary instead of floating anywhere, and capture groups pull pieces out of a match for reuse. Seeing matches highlighted live — with each group broken out — turns regex from guesswork into something you can actually verify.
This runs on the browser's own JavaScript engine, entirely client-side, so your patterns and test data stay local.
Anchors vs. quantifiers
Control where a match may start or end — without consuming characters.
Control how many times the preceding token repeats.
Where developers use it
Validating input
Build and test an email or phone pattern against real and malformed samples before wiring it into a form.
Extracting data
Use capture groups to pull dates or IDs out of log lines and confirm each group lands correctly.
Search & replace
Prototype a find pattern here before running it across a codebase in your editor.
Frequently asked questions
JavaScript (ECMAScript) regular expressions, via the browser's native engine. Most syntax is shared across languages, but details differ — JS has no \A/\z anchors, uses (?<name>…) for named groups, and only supports lookbehind in modern engines. Patterns here behave exactly as they will in your JS/TS code.
g finds all matches (not just the first); i ignores case; m makes ^/$ match per line; s lets . match newlines; u enables full Unicode; and y anchors matching to lastIndex.
You probably need the global flag. Without g, the engine returns only the first match. Toggle g to scan the whole string — this tester then lists every match with its index and groups.
(…) is a capturing group you reference by number; (?<year>…) is a named group you reference by name, which is far more readable. (?:…) groups without capturing at all. This tester lists every group it finds per match.
Nested quantifiers on overlapping patterns — like (a+)+ — can cause catastrophic backtracking, where the engine explores exponentially many paths. Rewrite to avoid ambiguity (be more specific, use possessive/atomic constructs where available) if a pattern hangs on certain inputs.
No. Matching runs locally with the browser's regex engine; nothing is uploaded.