我需要的如「2014」(XXXX)的線串匹配,我的意思是:PHP REG前
空間,並在字符串末尾修復4位
The Shawshank Redemption 1994
The Godfather 1972
The Dark Knight 2008
Pulp Fiction 1994
The Good, the Bad and the Ugly 1966
Schindler's List 1993
12 Angry Men 1957
The Lord of the Rings: The Return of the King 2003
Fight Club 1999
我會用這與
$pattren='';
$replace=preg_replace($pattren, "", $input_lines);
首先我嘗試使用爆炸,但沒有作品如我所料,我有不好的訣竅與正則表達式
偉大的鏈接很容易檢查。謝謝 : ) – 2014-09-25 18:48:25