So with python regex matching, we have the meaning of \w and others affected by the re.LOCALE flag:
\w
When the LOCALE and UNICODE flags are not specified, matches any
alphanumeric character and the underscore; this is equivalent to the
set [a-zA-Z0-9_]. With LOCALE, it will match the set [0-9_] plus
whatever characters are defined as alphanumeric for the current
locale.
So we want to find out what characters are defined as alphanumeric for a given locale – say we did ‘locale -a’ and we have a list of locales, and want to find the info for one of the listed locales on the system. Any method to find the info quickly: a python code snippet or one-liner, shell command or maybe reference material somewhere.
Use string.letters.
Example: