re.split() problem
竹村 雅之 ( Takemura Masayuki )
ICG04984 at nifty.com
Fri Sep 23 04:46:31 EDT 2005
Thanks for your reply.
>>> In Re: re.split() problem
>>> [Fredrik] = "Fredrik Lundh" wrote
Fredrik> >>> s = "foo\nbar\n\nbaz"
Fredrik> >>> re.findall("(?s).*\n\n|.+$", s)
Fredrik> ['foo\nbar\n\n', 'baz']
Fredrik> (this also lets you use finditer so you can process huge texts without
Fredrik> having to hold everything in memory)
Thanks. This sovles my problem.
> Will it be fixed in Python 2.4.2?
Fredrik> 2.4.2 is a bug fix release. "doesn't work as you intend" doesn't really
Fredrik> count as a bug
I'm sorry for my expression. I should have written "Will those features which were discussed
in these threads be released in Python 2.4.2 ?"
More information about the Python-list
mailing list