Regex Matching
Greedy Matching
By default, regex patterns are greedy, meaning they match as much as possible.
For example, the regex pattern go.*gle
matches google
in the string go google
.
Lazy Matching
Lazy matching is used to match as little as possible.
For example, the regex pattern go.*?gle
matches go
in the string go google
.