hot to use perg_match with multi strign patern

From: Date: Wed, 07 May 2003 17:59:38 +0000
Subject: hot to use perg_match with multi strign patern
Groups: php.general 
Request: Send a blank email to php-general+get-146626@lists.php.net to get a copy of this message
Dear Sirs, I want search more than one words in the string. I am trying to use preg_match with following script but it is finding only last one. I wan to find either yes or no. But it is finding only "no" not "yes". Actally I want to check bad words in the string such as spelling. Where is my problem? if (preg_match("/(yes)?(no)/i", $mesage, $matches)) { print "refusee - $matches[0]"; } else { print "negative"; }; Best Regards

« previous php.general (#146626) next »