Read the first and last character of line in txt
<p>I wanna take lines that start with capital and end with dot.</p>

<pre><code>function isCapital($string) {
    return preg_match('/^\\s*[A-Z]/', $string) &gt; 0;
}

foreach ($url as $file =&gt; $files) {
    $lines = file($files);
    foreach ($lines as $key =&gt; $line) {
        if (isCapital($line) &amp;&amp; (substr($line, -1) == '.')) {
            print_r( $line);
        }
    }
}
</code></pre>

<p>But, it does not work, blank result. What's wrong?</p>
