Regex for unicode letter characters

MRAB google at mrabarnett.plus.com
Sat Jan 10 21:33:26 EST 2009


schickb wrote:
> I need a regex that will match strings containing only unicode letter
> characters (not including numeric or the _ character). I was surprised
> to find the 're' module does not include a special character class for
> this already (python 2.6). Or did I miss something?
> 
> It seems like this would be a very common need. Is the following the
> only option to generate the character class (based on an old post by
> Martin v. Löwis )?
> 
[snip]
Basically, yes.

The re module was last worked on in 2003 (remember it's all voluntary!). 
Such omissions should be addressed in Python 2.7.



More information about the Python-list mailing list