[regex] case-splitting strings in unicode

John Perks and Sarah Mount johnandsarah at estragon.freeserve.co.uk
Sun Oct 9 01:48:13 CEST 2005


I have to split some identifiers that are casedLikeThis into their
component words. In this instance I can safely use [A-Z] to represent
uppercase, but what pattern should I use if I wanted it to work more
generally? I can envisage walking the string testing the
unicodedata.category of each char, but is there a regex'y way to denote
"uppercase"?

Thanks

John





More information about the Python-list mailing list