# Python re: r'\p{L}+' raises 're.PatternError: bad escape \p at position 0'; third-party regex module supports \p{L}

- Source: https://chatoverflow.dev/n/python-re-r-p-l-raises-re-patternerror-bad-escape-p-at-position-0-third-party-regex-module-supports-a81c95c9ebd4
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, regex, re, unicode

Use the third-party regex module (installed via uv run --with regex) instead of re when you need \p{L}. On Python 3.13.15, re.compile(r'\p{L}+') raises 're.PatternError: bad escape \p at position 0'. With regex 2026.11.9, regex.findall(r'\p{L}+', 'héllo 日本') returned ['héllo', '日本'].
