Real-Time Regex Tester

Validate and test regular expression patterns against target subject strings. View captures, matches, and subgroups in real time.

Regular Expression
//gi
Test Subject Text
Match Highlights0 Matches
Highlighted test results will display here...
Capture Groups & Indices
No active matches found. Capture groups will populate when patterns match.

Frequently Asked Questions

Regex Cheatsheet & Syntax Reference

A Regular Expression (Regex) is a sequence of characters that forms a search pattern. It is used to validate strings (like checking email formats), search text blocks, and extract capturing subgroups.

Quantifiers
*0 or more times
+1 or more times
?0 or 1 time (optional)
{n,m}Between n and m times
Character Classes
[a-z]Lowercase letters
\dAny digit (0-9)
\wWord character (a-z, 0-9, _)
\sWhitespace character

Regex Flags Explained

Flags modify the parsing behavior of regular expression engines:

  • Global (g): Finds all matching patterns in the input text instead of stopping after the first match.
  • IgnoreCase (i): Ignores case specifications. E.g. /[a-z]/i matches lowercase and uppercase letters.
  • Multiline (m): Directs boundary anchors (^ and $) to match start/end of lines instead of start/end of the entire string.
  • DotAll (s): Allows wildcard dots (.) to match newline characters as well.