Learn Before
Concept
Greedy/ non-greedy matching
Greedy matching: In the greedy mode (by default), regular expressions always match the largest string they can. Non-greedy matching: The operator +? is a Kleene plus that matches as little text as possible.
0
1
Updated 2021-09-12
Tags
Regular Expression
Data Science
Related
Regular expression reference
Basic Regular Expression Patterns
Operator precedence hierarchy
False positive and false negative errors for regex matching
Regular Expression Cheatsheet
Capture Group
Non-capturing Group
Lookhead Assertion
Greedy Matching in Regular Expression
Non-greedy Matching in Regular Expression