Re: re.split() problem
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
Re: re.split() problem
Masayuki Takemura wrot: > re.split() doesn't work as I intend. it works as it's supposed to work. empty matches are not considered to be valid split points, partially because it doesn't really make sense to split on nothing in most cases, but mostly because doing so will, most likely, result in