Tag

quantifiers

1 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
May 9, 2025 · Fundamentals

Understanding Greedy and Non‑Greedy Matching in Regular Expressions

This article explains the difference between greedy and non‑greedy (lazy) matching in regular expressions, describes how quantifiers behave by default, shows how to switch to lazy mode using a trailing question mark, and provides multiple Python code examples illustrating both approaches.

Regular Expressionsgreedy matchingnon-greedy
0 likes · 8 min read
Understanding Greedy and Non‑Greedy Matching in Regular Expressions
Python Programming Learning Circle
Python Programming Learning Circle
Apr 8, 2021 · Fundamentals

Python Regular Expressions: Syntax, Character Classes, Quantifiers, Groups, Assertions, Flags, and Usage

This article provides a comprehensive overview of Python's regular expression features, covering special characters, character classes, quantifiers, grouping, backreferences, assertions, conditional matching, flags, and the most commonly used methods of the re module with illustrative code examples.

AssertionsPattern MatchingRegular Expressions
0 likes · 14 min read
Python Regular Expressions: Syntax, Character Classes, Quantifiers, Groups, Assertions, Flags, and Usage