[Python-bugs-list] [ python-Bugs-410271 ] SRE: word-based anchors ignore locale
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 22 Mar 2001 07:52:58 -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: Closed
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 едц")
----------------------------------------------------------------------
Comment By: Fredrik Lundh (effbot)
Date: 2001-03-22 07:29
Message:
Logged In: YES
user_id=38376
fixed in 2.1b2
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410271&group_id=5470