Gave the code above a bash, and it did work, the only thing I missed was the fact that some fothe data may contain UPPERCASE characters. I came up with this as well as some additions to put the data into an array;
$item = str_replace ("\r", '', $item);
$item = preg_replace ('/(QUOTE|DETAILS|PROPOSER|CONTINUED|POLICY|VEHICLE)([^\n]+)(\n)/', '', $item);
while (strpos ($item, "\n\n") !== false) {
$item = str_replace ("\n\n", "\n", $item);
}
$item = str_replace ("\n", "\r\n", $item);
$item = stristr($item, 'Title:');
//echo $item;
$item = explode("\n",$item);
//print_r($item);
$arrayLength = count($item);
for ($i = 0; $i < $arrayLength; $i++){
$item[$i] = stristr($item[$i], ': ');
$item[$i] = str_replace (": ", '', $item[$i]);
$item[$i] = rtrim($item[$i]);
echo "[" . $i . "] [" .$item[$i] . "]<br>\n";
}
It works, I dont know if it is the best/efficient/fastest way to handle the data but for now i'm happy. I only hope the email that we get sent doesn't alter. Thank you BrandtJ for the starting point, I never know how to crack regexp. If you do them allday long then i spose you get used to `em!