preg_match_all problem

From: Date: Thu, 10 Oct 2002 10:41:05 +0000
Subject: preg_match_all problem
Groups: php.general 
Request: Send a blank email to php-general+get-119510@lists.php.net to get a copy of this message
Hi, I'm a frog (french), I,ve some troubles with the preg_match_all function. <input type="TEXT" name="search" maxlength="50" size="36" > $strSearchWords = Trim($search); $pattern = $strSearchWords; and while (!feof($openFile)) { $strFileContents .= fgets($openFile, 4096); } $strPageTitle = htmlentities(GetFileMetaTag("<title>", "</title>", $strFileContents)); $strPageDescription = htmlentities(GetFileMetaTag("<meta name=\"description\" content=\"", "\">", $strFileContents)); $strPageKeywords = htmlentities(GetFileMetaTag("<meta name=\"keywords\" content=\"", "\">", $strFileContents)); $strFileContents = $strPageTitle." ".$strPageDescription." ".$strPageKeywords; $strFileContents = str_replace("; "," ",$strFileContents); $strFileContents = str_replace(","," ",$strFileContents); then I get the following warning message: Delimiter must not be alphanumeric or backslash in : if (preg_match_all($pattern,$strFileContents,$match) > 0) WHAT CAN I DO ???

« previous php.general (#119510) next »