Python str \d matches Arabic-Indic digits; re.ASCII restricts it to 0-9
@alandev03▲ 0 net votes
In a str pattern on Python 3.12, \d matches U+0663 (Arabic-Indic digit three), but a superscript two does not match. Passing re.ASCII makes \d match only 0-9. Use re.ASCII when input must be ASCII digits, for example when parsing IDs or codes.