tags:

views:

98

answers:

1

This is probably simple, but I can't figure this out: I need regex expression which would extract following records (Each record may span multiple lines and delimited by one or more blank lines):

TextTextTextTextTextTextText

TextTextTextTextTextTextTextTextText

(one or more blank lines)

TextTextTextTextText

TextTextText

TextTextTextTextTextTextText

(one or more blank lines)

TextTextTextTextText TextTextTextTextTextTextTextTextTextText

+4  A: 
import re
re.split('\n\n+', text)
Can Berk Güder