В массиве будут записи вида
[0 => [], 1 => []], останется только по массиву пройтись foreach и сохранить в нужном виде (csv, tsv, ...)
<?php
function parse($text) {
$lines = explode("\n", $text);
$result = [];
$switched = false;
$i = 0;
foreach($lines as $line) {
// Add item
if (count($matches = preg_split('/->/', $line, -1, PREG_SPLIT_NO_EMPTY)) == 2) {
if (!isset($result[$i])) {
$result[$i] = [];
}
$result[$i][$matches[0]] = $matches[1];
$switched = false;
} else if (!$switched) {
$i++;
$switched = true;
}
}
return $result;
}
$text = "
_wpcf7->104
_wpcf7_version->4.7
_wpcf7_locale->ru_RU
_wpcf7_unit_tag->wpcf7-f104-p157-o3
_wpnonce->2b8273a977
your-name->Krisan Lang
menu-968->Firma
text-463->Best OÜ
tel-179->58813468606
your-email->kridgfgstjan@best5apartments.ee
November 29, 2017, 18:07:14
_wpcf7->104
_wpcf7_version->4.7
_wpcf7_locale->ru_RU
_wpcf7_unit_tag->wpcf7-f104-p67-o1
_wpnonce->2b8273a977
your-name->Liis dfValma
menu-968->Eraisik
text-463->
tel-179->5396643367
your-email->liisvalma2401@gmail.com
";
print_r(parse($text));