我要删除“ ”从我的HTML在打字稿

问题描述

这是我作为字符串得到的。我需要将其放在<p>中,但找不到任何解决方

An investment strategy that's sosimple&#160;and so&#160;effective,we call it the "magic portfolio." It's a way to&#160;guarantee&#160;that you will beat the market.

我正在使用

return text.replace(/(<[^>]+>)/g,"");

解决方法

尝试使用text.replcae(您的reg表达式).replace(您的reg表达式)