re.split() problem

M

Masayuki Takemura

Hi all.

re.split() doesn't work as I intend.

My Python Version is 2.4.1
(#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32.

For example,
['foo\nbar\n\nbaz']

but I expected ['foo\nbar\n', 'baz'].

This problem has been discussed following threads.

[ 852532 ] ^$ won't split on empty line
<http://sourceforge.net/tracker/index.php?func=detail&aid=852532&group_id=5470&atid=105470>

re.split on empty patterns
<http://thread.gmane.org/gmane.comp.python.devel/62231>

Will it be fixed in Python 2.4.2?

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top