split on blank lines
Hans Nowak
hans at zephyrfalcon.org
Mon Dec 1 12:40:08 EST 2003
Duncan Booth wrote:
> Given that re.compile("^$", re.MULTILINE).findall("foo\n\nbar\n\nbaz")
> returns ['', ''] I would agree this looks like a bug. You could submit a
> bug report on Sourceforge.
I may be wrong, but I would think that the behavior is correct. "^$" matches an
empty line. This is exactly what findall returns... two empty lines.
--
Hans (hans at zephyrfalcon.org)
http://zephyrfalcon.org/
More information about the Python-list
mailing list