Re: unicode categories -- regex

2007-09-22 Thread koara
> At the moment, you have to generate a character class for this yourself, > e.g. > ... Thank you Martin, this is exactly what i wanted to know. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode categories -- regex

2007-09-22 Thread Martin v. Löwis
> So how do i include this information in regular pattern search? Any > ideas? At the moment, you have to generate a character class for this yourself, e.g. py> chars = [unichr(i) for i in range(sys.maxunicode)] py> chars = [c for c in chars if unicodedata.category(c)=='Po'] py> expr = u'[\\' + u

unicode categories -- regex

2007-09-22 Thread koara
Hello all -- my question regards special meta characters for the re module. I saw in the re module documentation about the possibility to abstract to any alphanumeric unicode character with '\w'. However, there was no info on constructing patterns for other unicode categories, such as purely alphab