Python tip 22: possessive quantifiers

Pubblicato il: 18 gennaio 2023
sul canale di: 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_...


In questa pagina del sito puoi guardare il video online Python tip 22: possessive quantifiers della durata di ore minuti seconda in buona qualità , che l'utente ha caricato learnbyexample 18 gennaio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 220 volte e gli è piaciuto 2 spettatori. Buona visione!