A regular expression (regex) is a pattern used to match sequences of characters in text. They're used everywhere: form validation, search-and-replace, log parsing, and extracting structured data from free-form strings.
Type a pattern and some test text and this tool shows every match — its position, the full matched text, and any capture groups — using your browser's native regex engine (JavaScript's RegExp), so behavior matches exactly what you'd get in code.
Global (g) finds every match instead of stopping at the first one. Ignore case (i) makes matching case-insensitive. Multiline (m) makes ^ and $ match the start and end of each line. Dot all (s) makes . also match newline characters.
Which regex flavor does this use?
JavaScript's native RegExp engine (ECMAScript syntax) — mostly compatible with PCRE, but with some differences in features like lookbehind support (which varies by browser).
Why doesn't my pattern match anything?
Common causes are a missing flag (like g for global or i for case-insensitive), unescaped special characters (., (, [), or a pattern that assumes multiline input without the m flag.
Are capture groups shown for every match?
Yes — each match's numbered groups (and named groups, if used) are listed separately so you can confirm exactly what each () captured.