Heim >Backend-Entwicklung >PHP-Tutorial >Php正则替换字符串
htmlStr.().().().replace().replace().replace().replace()
return htmlStr.replaceAll("<script[^>]*?>[\\s\\S]*?</script>", "").replaceAll("<style[^>]*?>[\\s\\S]*?</style>", "").replaceAll("<[^>]+>", "").replace(" ", "").replace("\n", "").replace("\t", "").replace(" ", "");