You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Unicode (str) patterns:
Matches Unicode word characters; this includes alphanumeric characters (as defined by str.isalnum()) as well as the underscore (_). If the ASCII flag is used, only [a-zA-Z0-9_] is matched.
For 8-bit (bytes) patterns:
Matches characters considered alphanumeric in the ASCII character set; this is equivalent to [a-zA-Z0-9_]. If the LOCALE flag is used, matches characters considered alphanumeric in the current locale and the underscore.
Is there an easy way to get \w except _ in the non-ASCII case? It would help checking snake_case.
Support of nested sets and set operations as in Unicode Technical Standard #18 might be added in the future. This would change the syntax, so to facilitate this change a FutureWarning will be raised in ambiguous cases for the time being. That includes sets starting with a literal '[' or containing literal character sequences '--', '&&', '~~', and '||'. To avoid a warning escape them with a backslash.
The underscore (
_
) is part of\w
. From https://docs.python.org/3/library/re.html#regular-expression-syntax:Is there an easy way to get
\w
except_
in the non-ASCII
case? It would help checking snake_case.codespell/codespell_lib/_codespell.py
Line 31 in ec0a5b9
The text was updated successfully, but these errors were encountered: