It's only a matter of correctly escaping your characters and correctly using PHP's automatic string evaluation (string declarations with 'double quotes')...
I always use single quotes when defining regexps, it's much safer.
Here is a little test i wrote to illustrate the differences:
Language: php (GeSHi-highlighted)
<?php
$data = '
\\dummy.txt
664
05:42:18
';
echo "<pre>
";
echo "data = $data <br>";
Echo '
<h2>PATTERN 1</h2>';
$pattern = '/\\\\([^\\\\]+)\\.txt\\n(\\d{2,3})\\n([\\d:]{8})/';
echo "\n\n<b>pattern 1 = $pattern</b>";
preg_match($pattern, $data, $match);
echo "\n\nmatch = ". $match[0];
echo "<blockquote>
This is the pattern with all backslashes escaped, to remove all ambiguities.
In this case, we can replace the 'single quotes' with 'double quotes' and the string remains identical.
To match a backslash character, the pattern uses an escaped backslash.
This means quadruple backslash in the string declaration.
Here, the pattern uses 'backslash-n' to match a new line.
</blockquote>";
$pattern = "/\x5C\x5C([^\x5C\x5C]+)\.txt\x5Cn(\x5Cd{2,3})\x5Cn([\x5Cd:]{8})/";
echo "\n\n<b>pattern 1 = $pattern</b>";
preg_match($pattern, $data, $match);
echo "\n\nmatch = ". $match[0];
echo "<blockquote>
This is exactly the same pattern but using 'double quotes' and 'hex values' in the string declaration.
</blockquote>
";
Echo '
<h2>PATTERN 2</h2>';
$pattern = '/\x5C([^\x5C]+)\\.txt\\n(\\d{2,3})\\n([\\d:]{8})/';
echo "\n\n<b>pattern 2 = $pattern</b>";
preg_match($pattern, $data, $match);
echo "\n\nmatch = ". $match[0];
echo "<blockquote>
This is a different pattern.
It uses the 'hex value' to match the backslash character instead of using an escaped backslash.
</blockquote>";
Echo '
<h2>PATTERN 3</h2>';
$pattern = "/\\\\([^\\\\]+)\\.txt\n(\\d{2,3})\n([\\d:]{8})/";
echo "\n\n<b>pattern 3 = $pattern</b>";
preg_match($pattern, $data, $match);
echo "\n\nmatch = ". $match[0];
echo "<blockquote>
This is yet a different pattern.
It uses the 'line-feed' character to match a new line instead of using a 'backslash-n'.
</blockquote>";
echo "
</pre>";
?>
Here is a summary of the code here-above:
Language: php (GeSHi-highlighted)
$pattern = '/\\\\([^\\\\]+)\\.txt\\n(\\d{2,3})\\n([\\d:]{8})/';
$pattern = "/\x5C\x5C([^\x5C\x5C]+)\.txt\x5Cn(\x5Cd{2,3})\x5Cn([\x5Cd:]{8})/";
$pattern = '/\x5C([^\x5C]+)\\.txt\\n(\\d{2,3})\\n([\\d:]{8})/';
$pattern = "/\\\\([^\\\\]+)\\.txt\n(\\d{2,3})\n([\\d:]{8})/";