preg_match third parameter,

// modify the variable p regular expression, so that he is able to match str name 
$ p = ' / name: ([\ W \ S] +) / ' ; 
$ str = " name: Steven Jobs " ; 
the preg_match ( P $, STR $, $ match); 


print_r ($ match); 

the Array ([0] => name: Steven Jobs [. 1] => Steven Jobs)    // ??????



 

Guess you like

Origin www.cnblogs.com/pansidong/p/11779552.html