[Python-bugs-list] [ python-Bugs-410271 ] SRE: word-based anchors ignore locale

noreply@sourceforge.net noreply@sourceforge.net
Wed, 21 Mar 2001 01:52:15 -0800


Bugs item #410271, was updated on 2001-03-21 01:52
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410271&group_id=5470

Category: Regular Expressions
Group: None
Status: Open
Priority: 7
Submitted By: Fredrik Lundh (effbot)
Assigned to: Fredrik Lundh (effbot)
Summary: SRE: word-based anchors ignore locale

Initial Comment:
the \b and \B anchors don't take the locale
settings into account.

import locale, re
locale.setlocale(locale.LC_ALL, "")

# should print ["egg", "and"]
print re.findall(r"\b...\b", "spam, egg, bacon, and 
едц")

# should print ["egg", "and", "едц"]
print re.findall(r"(?L)\b...\b", "spam, egg, bacon, 
and едц")


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410271&group_id=5470