convert preg_match results to boolean