in reply to Multiple newline regex

You're reading one line at a time.

Update: here's a fix that reads in paragraph mode. I think this is what you want.

$/=''; while (<DATA>) { print "$1\n" if /(\d)\n\n/; }

Caution: Contents may have been coded under pressure.