[ python-Bugs-852532 ] ^$ won't split on empty line
SourceForge.net
noreply at sourceforge.net
Tue Dec 2 06:01:42 EST 2003
Bugs item #852532, was opened at 2003-12-02 06:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=852532&group_id=5470
Category: Regular Expressions
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jan Burgy (jburgy)
Assigned to: Fredrik Lundh (effbot)
Summary: ^$ won't split on empty line
Initial Comment:
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200
32 bit (Intel)] on win32
>>> import re
>>> re.compile('^$', re.MULTILINE).split('foo\n\nbar')
['foo\n\nbar']
I expect ['foo\n', '\nbar'], since, according to the
documentation $ "in MULTILINE mode also matches
before a newline".
Thanks, Jan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=852532&group_id=5470
More information about the Python-bugs-list
mailing list