<? $text = "pot post pat patent"; if ( preg_match( "/\bp\w+t\b/", $text, $array ) ) { print "<pre>\n"; print_r( $array ); print "</pre>\n"; } ?>