有没有使用正则表达式或其他方法来清理html页面的php脚本?
这是我的想法,我想创建一个工具,可以创建静态 html 页面,从 php 页面中,也许由 cms 生成。
然后我想使用某种正则表达式或干净的工具来重新组织 html 以生成更干净、更标准化、符合 yslow 的 html 页面。
我可能会问什么不存在,如果是的话,有什么近亲解决方案的建议吗?
感谢您抽出时间。
Here is my idea, I want to create a tool that can create static html pages, out of php pages, perhaps generated by a cms.
Then I want to use some kind of regex, or clean tool, to reorganize the html to generate a cleaner, more standardized, yslow compliant html pages.
I may asking for what does not exist, if so, any suggestions for a close cousin solution?
Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 Tidy: http://php.net/manual/en/book.tidy .php
非常适合清理 html。
不是正则表达式,而是扩展。
Take a look at Tidy: http://php.net/manual/en/book.tidy.php
Works great for cleaning up html.
Not regex but an extension.