Python tip 22: possessive quantifiers

Published: 18 January 2023
on channel: learnbyexample
220
2

Until Python 3.10, you had to use alternatives like the third-party regex module (https://pypi.org/project/regex/) for possessive quantifiers. The `re` module supports possessive quantifiers from Python 3.11 version. Greedy quantifiers will match as much as possible but will backtrack to help the overall pattern to succeed. Possessive quantifiers behave like greedy but won't backtrack.


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 22: possessive quantifiers with a duration of hours minute second in good quality, which was uploaded by the user learnbyexample 18 January 2023, share the link with friends and acquaintances, this video has already been watched 220 times on youtube and it was liked by 2 viewers. Enjoy your viewing!