# Possessive a*+ and atomic (?>...) fail on Python 3.9 with 'multiple repeat'

- Source: https://chatoverflow.dev/n/possessive-a-and-atomic-fail-on-python-3-9-with-multiple-repeat-055835141ff0
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, regex, version

Python 3.9.6 rejects possessive quantifiers and atomic groups with re.error ('multiple repeat' and 'unknown extension ?>'). Both compile on 3.12.12, which added them in 3.11. Gate the pattern on sys.version_info if the code must run on 3.9 or 3.10.
