Title: Disagreement with CPython about which unicode characters are alnum · Issue #7518 · RustPython/RustPython · GitHub
Open Graph Title: Disagreement with CPython about which unicode characters are alnum · Issue #7518 · RustPython/RustPython
X Title: Disagreement with CPython about which unicode characters are alnum · Issue #7518 · RustPython/RustPython
Description: Summary The regex module interprets \w as matching more characters than it seems like it should (certainly more than CPython does). Expected import re assert not re.match(r"\w", "\u0345"), r"\w should not match U+0345 (category Mn)" This...
Open Graph Description: Summary The regex module interprets \w as matching more characters than it seems like it should (certainly more than CPython does). Expected import re assert not re.match(r"\w", "\u0345"), r"\w sho...
X Description: Summary The regex module interprets \w as matching more characters than it seems like it should (certainly more than CPython does). Expected import re assert not re.match(r"\w", "\u0...
Opengraph URL: https://github.com/RustPython/RustPython/issues/7518
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Disagreement with CPython about which unicode characters are alnum","articleBody":"## Summary\n\nThe regex module interprets \\w as matching more characters than it seems like it should (certainly more than CPython does).\n\n## Expected\n\n```\nimport re\n\nassert not re.match(r\"\\w\", \"\\u0345\"), r\"\\w should not match U+0345 (category Mn)\"\n```\n\nThis assertion should pass, but instead it fails.\n\n## Python Documentation\n\nhttps://docs.python.org/3/library/re.html\n\nThis says that it should match anything for which isalnum() is true. This turns out to be also an area where RustPython and CPython disagree. `\"\\u0345\".isalnum()` returns False on CPython and True on RustPython.","author":{"url":"https://github.com/DRMacIver","@type":"Person","name":"DRMacIver"},"datePublished":"2026-03-27T16:08:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7518/RustPython/issues/7518"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c3fade43-5de8-bbfe-c00d-c6cd9d36344e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C002:79D12:9BA556:DBEB97:6A625044 |
| html-safe-nonce | ec90f65b82cc2727b14affa7ef9cb1cc36923c6c828799fb5a7dce65a9436c6d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDAyOjc5RDEyOjlCQTU1NjpEQkVCOTc6NkE2MjUwNDQiLCJ2aXNpdG9yX2lkIjoiMTEwODk3NzU2NTY4MjUyMDEzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1c40a4d2cf85fb771de7d936d01558170a0cde15feb1f903f6587bbeccd46192 |
| hovercard-subject-tag | issue:4154013318 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/7518/issue_layout |
| twitter:image | https://opengraph.githubassets.com/070762a1bb8ffae4fc90574b2c201811cd72d1f391c71e232e3dc2f266a24563/RustPython/RustPython/issues/7518 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/070762a1bb8ffae4fc90574b2c201811cd72d1f391c71e232e3dc2f266a24563/RustPython/RustPython/issues/7518 |
| og:image:alt | Summary The regex module interprets \w as matching more characters than it seems like it should (certainly more than CPython does). Expected import re assert not re.match(r"\w", "\u0345"), r"\w sho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DRMacIver |
| hostname | github.com |
| expected-hostname | github.com |
| None | 77f5af7d0fa3843b1779a53f60ec016b3f962e46051fb05c2e9b608a8138eefb |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d3ce7d369aae307e197872f810f80f3ed9051c78 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width