in reply to Contents b/w two given text
perl -e '$/="text1"; <>; $/="text2"; $_=<>; chomp; print "$_\n";' < fi +le [download]
One world, one people