Regex Tester

Test regular expressions, flags, and matches against text directly in your browser.

Search options (flags)

Flags change how the regular expression search behaves.

Active flags: g

Examples

Matches: 0

No matches found.

What a regular expression is

A regex describes text patterns. It can find numbers, check formats, or extract fragments, but a match does not replace complete contextual validation.

The g, i, and m flags

g finds multiple matches, i ignores letter case, and m changes how ^ and $ work across lines. The s, u, and y flags are also supported.

Limits and expensive expressions

The tester limits patterns to 300 characters, text to 20,000, and results to 1,000. Some expressions can still be expensive due to backtracking; limits reduce risk but do not make every regex safe.

Explore all web development tools

Related tools