split on blank lines
hans at zephyrfalcon.org
Mon Dec 1 18:40:08 CET 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)
More information about the Python-list