> 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 ??? > I had this problem only a day ago. You have forgotten to add slashes to your pattern. The variable $pattern looks something like this:
"\d+\s" when it should look like this: "/\d+\s/" Hope that was helpful, Archie --- Archibald Zimonyi [EMAIL PROTECTED] "There is no logic like no logic" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php