$re = '/^(\d+)\. ?(.+?)(?:value|vlaue|balue|valie): ?(.+?)[\n\r]{2,}/ms';
$str = 'Some junk data
More junk data
1. fairly long key, all on one line
value: some other text with spaces and stuff
Some junk data
More junk data
2. hey look! another long
and broken key. on two lines
value: a different value with some different information
Some junk data
More junk data
3. hey look! another long line. on a line
value: a different value
broken, with some different information
Some junk data
More junk data ';
$subst = "";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php