php匹配2个特殊字符之间的字符串

$keyword = "· /WebRoot/BMS/nyjg/qsjgyb_edit.jsp (-0, +138) | History | Source · /src/module/com/module/slxtrvice (-0, +0) | History | Source · /WebRoot/BMS/slxt/js/slxsqyxsrb.js (-0, +203) | History | Source · /src/module/com/module/nyjg/hibernate/impl/QsjgybDaoImpl.java (-0, +14) | History | Source · /src/module/com/module/nyjg/entity/Nngmyz.java (-0, +401) | History | Source · /src/module/com/module/slxt/impl (-0, +0) | History | Source · /WebRoot/BMS/slxtqk_list.jsp (-0, +28) | History | Source · /WebRoot/BMS/slxt/js/printcppc.js (-0, +41) | History | Source · /src/module/com/module/nyjg/manager/QsjgybManager.java (-0, +19) | History | Source · /WebRoot/BMS/slxt/js/slsccjxsrb.js (-0, +252) | History | Source · /src/module/com/module/slxt (-0, +0) | History | Source · /src/module/com/module/nyjg/struts/NzzzqkAction.java (-0, +155) | History | Source · /WebRoot/BMS/slxt/js/area.js (-0, +226) | History | Source · /WebRoot/BMS/nyjg/nzzzqk_add.jsp (-0, +146) | History | Source · /src/module/com/module/nyjg/hibernate/impl/NngmyzDaoImpl.java (-0, +13) | History | Source … 93 more files in changeset.";

创新互联专业为企业提供大田网站建设、大田做网站、大田网站设计、大田网站制作等企业网站建设、网页设计与制作、大田企业网站模板建站服务,10多年大田做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

//匹配括号之间的字符串

$result = array();

preg_match_all("/\(([^()]+|(?R))*\)/", $keyword, $result);

var_dump($result);


当前标题:php匹配2个特殊字符之间的字符串
转载源于:http://azwzsj.com/article/ihpopi.html