In Perl, you can do:
#!/usr/bin/perl
use 5.10.1;
use warnings;
use strict;
my $str = q!Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae dapibus tortor. Duis odio massa, viverra quis vestibulum nec, tincidunt ac tellus.
Ut id enim sapien, ut varius dolor. Curabitur ipsum dolor, consectetur quis fermentum ut,
aliquam nec felis. Praesent sed malesuada sem. Integer cursus lectus ac eros aliquet rutrum.!;
$str =~ /\A(.+)[\s\S]+?(.+)\Z/;
say '$1 = ',$1;
say '$2 = ',$2;
Output:
$1 = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae dapibus tortor. Duis odio massa, viverra quis vestibulum nec, tincidunt ac tellus.
$2 = aliquam nec felis. Praesent sed malesuada sem. Integer cursus lectus ac eros aliquet rutrum.
Explanation:
/ : begin of regex
\A : begining of string
( : begining of group 1
.+ : any char except newline one or more time
) : end of group 1
[\s\S] : any char including newlines
+? : one or more time non greedy
( : begining of group 2
.+ : any char except newline one or more time
) : end of group 2
\Z : end of string
/ : end of regex
Sure this can be adapted to others languages.