2011-04-09 51 views

回答

9

開始(^)與字字符(\w)和具有其中一個或多個(+),並應捕獲並存儲在$比賽(括號內)

$in = "First word is captured"; 
preg_match("/^(\w+)/",$in,$matches); 
echo $matches[1]; 
+0

謝謝,只是工作。 – KennyJones 2011-04-09 22:32:19

相關問題