首页 >后端开发 >php教程 >Php正则替换字符串

Php正则替换字符串

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-23 13:27:02949浏览

htmlStr.().().().replace().replace().replace().replace()
return htmlStr.replaceAll("<script[^>]*?>[\\s\\S]*?</script>", "").replaceAll("<style[^>]*?>[\\s\\S]*?</style>", "").replaceAll("<[^>]+>", "").replace(" ", "").replace("\n", "").replace("\t", "").replace(" ", "");


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn