Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support regex capture group names named in Chinese #2276

Open
BlackCleaverLoli opened this issue May 12, 2024 · 2 comments
Open

Please support regex capture group names named in Chinese #2276

BlackCleaverLoli opened this issue May 12, 2024 · 2 comments
Labels

Comments

@BlackCleaverLoli
Copy link

Bug Description

When using Chinese characters as capture group names, the "?" in them will be incorrectly recognized as a quantifier.

Reproduction steps

Name a capture group using Chinese characters, such as (?<汉字>123)

Expected Outcome

"汉字" in the previous text should be considered as the capture group name and match "123".

Browser

Include browser name and version
Microsoft Edge 124.0.2478.97

OS

Include OS name and version
Windows 10 22H2

@Unknownuserfrommars
Copy link

Unknownuserfrommars commented May 13, 2024

Well yes, i tried reproducing your code by adding a P, as in (?P<汉字>123), but it didn't work. When i tried to replace 汉字 as hanzi: (?P<hanzi>123), it worked fine.

Also, the named capture group won't work for any Chinese characters, like 玩家 or 厉害

Hope you can fix this problem.

Browser:
Chrome 123.0.6312.106 (64 bit)
OS:
Windows 11 23H2

@Unknownuserfrommars
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants