【发布时间】:2015-02-21 13:20:23
【问题描述】:
html_entity_decode($string, ENT_QUOTES, 'UTF-8'); 的 Java 等价物是什么?
在 PHP 中。
示例:
这是我的文字,
Mivan is an aluminium formwork system developed by a European construction company. In 1990, the Mivan Company Ltd. from Malaysia started manufacturing these formwork systems. Today, more than 30,000sqm of formwork from Mivan Co. Ltd.
Advantages:
· More seismic resistance
· Increased durability
· Lesser number of joints and reduced leakages
· Higher carpet area
要求的格式是:
Mivan is an aluminium formwork system developed by a European construction company. In 1990, the Mivan Company Ltd. from Malaysia started manufacturing these formwork systems. Today, more than 30,000sqm of formwork from Mivan Co. Ltd. Advantages: · More seismic resistance · Increased durability · Lesser number of joints and reduced leakages .Higher carpet area.
在java中使用以下正则表达式删除空格/制表符/换行不起作用
comment=comment.replaceAll("\\s+", "");
comment=comment.replaceAll("\t\n\r", "");
【问题讨论】:
-
这与 HTML 实体有什么关系?代码中是否包含任何 html 实体?
-
这不是您在示例中提供的文本。您能否编辑您的问题并编写您遇到问题的 实际 文本、您真正期望的结果、您正在使用的代码以及该代码产生的您不喜欢的结果?顺便说一句,相关的PHP命令不是
strip_tags而不是html_entity_decode吗?