$text =~ s%(?:\r\n){2,}%<br /><br />%g; [download]
In reply to Re^3: Regex with newline by choroba in thread Regex with newline by voyager