I have At the top of a loop
$ts = '/(' . $trigger_string .')/is'; echo "trigger_string is $ts <br>"; $matches = array(); $hit = array(); In the loop $hit[] = preg_match ($ts, $line_in,$matches); Now the $hit array fills up correctly, if the trigger string is on the line just read in, putting 1 or 0 in $hits. But the string that triggered the match is not put in $matches. The manual says it should be. Anyone any idea what I am doing wrong ? {R} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php