Home  >  Article  >  Backend Development  >  头晕了 简单正则不会写,哪位高手帮速看看。多谢

头晕了 简单正则不会写,哪位高手帮速看看。多谢

WBOY
WBOYOriginal
2016-06-13 12:53:28890browse

头晕了 简单正则不会写,谁帮速看看。。谢谢
$a='
abc

abc123
';

$c=preg_replace('#.*(.*).*#U','',$a);

想替换掉及2个里面的内容.....


------解决方案--------------------
本帖最后由 xuzuning 于 2013-02-25 15:47:39 编辑 $c = preg_replace('#(.*).*#Us','',$a);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn