Dev

Regex Tester

Pattern

Set regular expression and flags first.

Common flags: g (global), i (ignore case), m (multiline), s (dotAll).

Input

Paste sample text to test your regex.

Result

Matches: 12
The quick brown fox jumps over the lazy dog. Fox is fast.

Frequently Asked Questions

What regex flavour does this tool use?
JavaScript regex (ECMAScript). Flags supported: g (global), i (case-insensitive), m (multiline, ^ and $ match line boundaries), s (dotAll, . matches newlines), u (Unicode mode). Lookahead/lookbehind are supported in ES2018+ (all modern browsers).
What is the difference between .test() and .match()?
RegExp.test(str) returns a boolean — does the pattern match? String.match(regex) returns the matched substrings (or null). This tool shows both: whether a match exists and all matched groups/captures highlighted in the text.
Why does my regex match nothing in multiline text?
Without the m flag, ^ anchors to the very start of the string and $ to the very end. With the m flag, ^ and $ match at every line start/end. If you're matching line-by-line patterns, add the m flag.