Created
January 20, 2014 09:58
-
-
Save zsmynl/8517650 to your computer and use it in GitHub Desktop.
过滤掉以“/开头”和“结束/”之间的字符串;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = '哈哈,开头我是被过滤的垃圾内容结束我才是要显示的内容一,开头我是被过滤的垃圾内容结束我才是要显示的内容二'; | |
echo $str = preg_replace("/开头.*?结束/", '', $str); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment