PHP preg match with line ends in Linux and Windows
<p>This code works on Linux but fails to match on Windows:</p>

<pre><code>if ( preg_match ( "~&lt;meta name='date' content='(.*)'&gt;\n&lt;meta name='time' content='(.*)'&gt;\n&lt;meta name='venue' content='(.*)'&gt;\n~", file_get_contents($filename), $matches) ) 
...
</code></pre>

<p>I guess the line end coding is wrong. How should I modifiy the pattern to be 
end-coding independent? </p>
