if($limit > 30) break;
$stream = new SplFileObject($file);
- $grepped = new RegexIterator($stream, '/'.$searchStr.'/');
+ $grepped = new RegexIterator($stream, '/'.$searchStr.'/i');
foreach($grepped as $found) {
$_text = $file;
-
+ # this search for a headline tag and the result will be used as
+ # the result text in the search results
$headlines = new RegexIterator($stream,"/<h2>([^<]+)<\/h2>/");
foreach($headlines as $headline) {
$_text = trim($headline);