Re: [Tutor] Unicode and regexes

2006-03-11 Thread Michael Broe
Thanks Kent, for breaking the bad news. I'm not angry, just terribly, terribly disappointed. :) "From http://www.unicode.org/unicode/reports/tr18/ I see that \p{L} is intended to select Unicode letters, and it is part of a large number of selectors based on Unicode character properties." Yeah,

Re: [Tutor] Unicode and regexes

2006-03-11 Thread Kent Johnson
Michael Broe wrote: > Does Python support the Unicode-flavored class-specifications in > regular expressions, e.g. \p{L} ? It doesn't work in the following > code, any ideas? From http://www.unicode.org/unicode/reports/tr18/ I see that \p{L} is intended to select Unicode letters, and it is p

[Tutor] Unicode and regexes

2006-03-10 Thread Michael Broe
Does Python support the Unicode-flavored class-specifications in regular expressions, e.g. \p{L} ? It doesn't work in the following code, any ideas? - #! /usr/local/bin/python """ usage: ./uni_read.py file """ import codecs import re text = codecs.open(sys.argv[1], mode='r', encoding='u