Unicode strings and ascii regular expressions
Fuzzyman
fuzzyman at gmail.com
Tue Jan 31 05:53:04 EST 2006
Fredrik Lundh wrote:
> Fuzzyman wrote:
>
> > Can someone confirm that compiled regular expressions from ascii
> > strings will always (and safely) yield unicode values when matched
> > against unicode strings ?
[snip..]
>
> ascii patterns work just fine on unicode strings. the engine doesn't care
> what string type you use for the pattern, and it always returns slices of
> the target string, so you get back what you pass in.
>
Thanks - that's what I hoped. :-)
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
> </F>
More information about the Python-list
mailing list