2016-01-20 62 views

回答

0

您可以使用:

$string = 'franco ([email protected]), juan ([email protected]), dario ([email protected]), laura ([email protected]).'; 

preg_match_all('/\(\K[^)]+/', $string, $m); 
print_r($m[0]); 

正則表達式破碎:

\( # match a literal (
\K # reset matched information 
[^)]+ # match 1 or more characters that is not) 

輸出:

Array 
(
    [0] => [email protected] 
    [1] => [email protected] 
    [2] => [email protected] 
    [3] => [email protected] 
) 
+1

它炒菜太棒了!非常感謝你! –

+1

完成,thx爲你的時間 –