Try this: <?php $text = "pot post pat patent"; if(preg_match("/\bp\w+t\b/", $text, $array)){ print $array[0]; } ?>
the pattern in preg_match() does not have correct limit :) ----- Original Message ----- From: "Gentian Hila" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 7:57 PM Subject: [PHP] Delimiter must not be alphanumeric or backslash hello there, I am just learning PHP now, so i am very new to it. I was trying the following code which i received from a PHP book. I am using Version 4.3.1 installed in windows <? $text = "pot post pat patent"; if(preg_match( "\bp\w+t\b", $text, $array ) ) print $array[0]; ?> I was expecting everuthing to go normally , but i get the following error: Warning: Delimiter must not be alphanumeric or backslash in f:\apache\apache\htdocs\index.php on line 3 Does anybody have an idea what might be wrong ? Gentian Hila -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php