我有这个字符串:
var content = '<?php echo $content; ?>';
看起来像:
<p style="text-align: center;"><span style="font-family: arial black,avant garde; color: #ff0000;"><strong>Dior</strong></span></p><p><span style="color: #339966;">As far as Candy could see there were plenty</span></p><p><span style="color: #339966;">Among those</span></p>
我想把它分成每一段,所以结果:
<p style="text-align: center;"><span style="font-family: arial black,avant garde; color: #ff0000;"><strong>Dior</strong></span></p>
<p><span style="color: #339966;">As far as Candy could see there were plenty</span></p>
...
我认为它可以用正则表达式完成,但我不确定。