splitting by double newline

MRAB python at mrabarnett.plus.com
Mon Feb 7 18:02:28 EST 2011


On 07/02/2011 21:15, Nikola Skoric wrote:
> Dana Mon, 7 Feb 2011 10:02:05 -0800 (PST),
> Ian<ian.g.kelly at gmail.com>  kaze:
>> self.tables = re.split(r'(?:\r\n){2,}|\r{2,}|\n{2,}', bulk)
>
> Thanks!
>
> I tried without "?:", but it didn't work. Can you tell me why is it
> important that group is noncapturing?
>
The scanner uses capture groups to identify which part matched. If you
provide additional capture groups it has problems...



More information about the Python-list mailing list