I'm trying to validate name fields with the re module.
\w
doesn't match non-ascii chars such as à
.
It seems that in many other regex engines, the solution would have been \p{L}
, but this isn't supported in python as it appears. What would be a suitable equivalent?
Update:
This is different from other questions around this topic, in that I'm looking for the unicode alternative to \w
which isn't the one obtained using the default re.UNICODE
flag (since this flag also makes \w
match digits and underscores).