Until Python 3.10, you had to use alternatives like the third-party regex module (https://pypi.org/project/regex/) for possessive quantifiers and atomic grouping. The `re` module now supports these features from Python 3.11 version. Greedy and non-greedy quantifiers will backtrack to help the overall pattern to succeed. Atomic grouping helps you isolate a portion of the pattern from further backtracking.
See also my "Python re(gex)?" ebook: https://github.com/learnbyexample/py_...
On this page of the site you can watch the video online Python tip 26: atomic grouping with a duration of hours minute second in good quality, which was uploaded by the user learnbyexample 11 April 2023, share the link with friends and acquaintances, this video has already been watched 338 times on youtube and it was liked by 7 viewers. Enjoy your viewing!