标签 正则表达式 下的文章

常用正则表达式收集[2016/09/28更新]

preg_replace,preg_match最后更新:2016/09/281、URL固定位置的匹配替换:语句:preg_replace("/[^\/pic-][(\d)]+/u","888", '/pic-132-315677-1.html'); //替换1位置的数字为888  输出结果:/pic-132-315677-888.html  2、匹配替换所有字符串(保留参数):原始内容:  $str = <a href="javascript:__doPostBack('AspNetPager1','1')" style="margin-right:5px;">1</a...

继续阅读 »