How to detect more than one line break \n in PHP?
<p>I need to detect more than one <code>\n</code>. Doesn't matter if it's 2 or 1000, as long as it's more than one <code>\n</code>. What would be the regex for this (if regex is necessary that is)?</p>

<p><strong>EDIT</strong></p>

<p>I am using this:</p>

<pre><code>$pregmatch = preg_match('#\\n\\n+#', $locations);
if ($pregmatch &gt; 0) {
    echo 'more than one, this many: '.count($pregmatch);
} else
        echo 'less than one';
</code></pre>

<p>but <code>count($pregmatch)</code> doesn't return the actual number of more than one <code>\n</code> detected. How can that be achieved?</p>
