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.";


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

$result = array();

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

var_dump($result);


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。