Regex101
01 / 02

Regex101 Fundamentals: Live Testing, Flavors & Explanations

Regex101: Live Testing, Flavors & Explanations

Regex101 is a web-based tool for building, testing, and debugging regular expressions interactively -- write a pattern against sample text and see live, highlighted matches, without repeatedly running the pattern inside an actual application to check it.

Selecting the Right Flavor

Regex syntax and behavior differ subtly between engines (PCRE, JavaScript, Python, Go) -- named group syntax, lookbehind support, Unicode handling. Testing against the actual target flavor gives more accurate results than assuming a universal standard.

Capture Groups

Pattern: (\d{4})-(\d{2})-(\d{2})
Input:   2026-09-09

Group 1: 2026   Group 2: 09   Group 3: 09

# Parenthesized sub-patterns let code extract each piece
# separately, rather than only getting the full match string

The Explanation Panel

Decomposes a pattern into its constituent parts (character classes, quantifiers, groups) and describes each in plain language -- useful for understanding a cryptic pattern inherited from existing code before modifying it.

Greedy vs. Lazy Quantifiers

Input: <b>bold</b> and <i>italic</i>

<.*>   -- greedy: matches the WHOLE string from first < to last >
<.*?>  -- lazy: matches just <b>, then </b>, then <i>, etc.

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free