firasdib/Regex101

Please support regex capture group names named in Chinese

Opened this issue · 2 comments

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

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