At 2003-07-05 20:01 +0200, Alan D'Angelo wrote: >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 :)
It is probably also a good idea to use single quotes ('/\bp\w+t\b/') so PHP won't try to interpret the '\w' and '\b' itself. Greetings, Jaap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php