python / python/cpython

`re` should support `\p{...}` character properties

Open
#95,555 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib topic-regex type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Reproduced steps

re.compile('\p{script=Han}') # 

actual:
will throw error
expect:
pass

Info:

changed log
8/3 add more info . Final thx @JelleZijlstra give an helpful link

Linked PRs
  • gh-151969
  • gh-152245
  • gh-153023
  • gh-156490

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with re.compile('\p{script=Han}') and read the Unicode Technical Report 18 link in the description. Done means Python's re supports this property syntax and the expression behaves as expected for Han-script characters; several linked PRs indicate that related work has already moved elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.