Given the following input:
aaaaaAlazyZgreeedyAlaaazyZaaaaa
We will use two patterns: one greedy: A.*Z, and one lazy: A.*?Z. These patterns yield the following matches:
A.*Z yields 1 match: AlazyZgreeedyAlaaazyZ (examples: Regex101, Rubular)
A.*?Z yields 2 matches: AlazyZ and AlaaazyZ (exampl...