Greedy/Non-Greedy Matching

Python Greedy and non-greedy matching explained with examples.

There are times when you want to match a pattern only optionally! The ? character flags the group that precedes it as an optional part of the pattern. For example, enter the following into the interactive shell:

Get hands-on with 1200+ tech skills courses.