Question: I would like to parse blocks of text (not paragraphs) that can be separated by more than two `\n` characters. For instance:

```

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Morbi quam nunc, pretium quis tincidunt in, tincidunt vel arcu.
Class aptent taciti sociosqu ad litora torquent per conubia nostra.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Morbi quam nunc, pretium quis tincidunt in, tincidunt vel arcu. 
Class aptent taciti sociosqu ad litora torquent per conubia nostra.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Morbi quam nunc, pretium quis tincidunt in, tincidunt vel arcu. 
Class aptent taciti sociosqu ad litora torquent per conubia nostra.

```

The first block is separated by `\n\n`, but the second and third blocks are separated by `\n\n\n`. I wanted to just use `string.split(r'\n\n')` instead of a regex, but the text can have any number of newlines separating each block. I can't seem to get a regex that allows for any number of newlines.

Answer: 
```
import re
re.split(r'\n{2,}', string)

```

You can specify repetition in a couple of ways:

* `*` - repeat the previous element zero or more times
* `+` - repeat the previous element one or more times
* `{m,n}` - repeat the previous element between `m` and `n` times, `m` defaults to 0 if not provided, `n` defaults to unlimited (actually 65535, but this is an implementation detail).

So to match `\n` repeated two or more times you would use `\n{2,}`.
`re.split("\n\n+",my_text)` ... I think would work

you could also do

```
map(lambda x:x.strip(),my_string.split("\n\n")) 

```

and that should work fine without a regex