¿Cuál es la parte que no entiendes?
Fíjate:
Código PHP:
Ver original<pre>
<?php
$texto = 'texto con saltos
de línea';
preg_match('/.*/', $texto, $match); // Sin el flag 's' $texto = 'texto con saltos
de línea';
preg_match('/.*/s', $texto, $match); // Con el flag 's' ?>
</pre>