这是字符串
(代码)
Pivot: 96.75<br />Our preference: Long positions above 96.75 with targets @ 97.8 & 98.25 in extension.<br />Alternative scenario: Below 96.75 look for further downside with 96.35 & 95.9 as targets.<br />Comment the pair has broken above its resistance and should post further advance.<br />
(文本)
“支点:96.75
我们的偏好:在 96.75 上方多头头寸,目标为 97.8 和 98.25。
另一种情况:低于 96.75 寻求进一步下行,目标为 96.35 和 95.9。
评论该货币对已突破阻力位,应进一步上涨。
"
结果应该是
(代码)
<b>Pivot</b>: 96.75<br /><b>Our preference</b>: Long positions above 96.75 with targets @ 97.8 & 98.25 in extension.<br /><b>Alternative scenario</b>: Below 96.75 look for further downside with 96.35 & 95.9 as targets.<br />Comment the pair has broken above its resistance and should post further advance.<br />
(文本)
支点:96.75
我们的偏好:96.75 以上的多头头寸,目标为 97.8 和 98.25。
另一种情况:96.75 下方寻找进一步下行空间,目标为 96.35 和 95.9。
评论该货币对已突破其阻力位,应进一步上涨。
porpuse :
把所有的词都包在:
签名前。
我试过这个 regex: ((\A )|(<br />))(?P<G>[^:]*):
,但它只适用于 python 环境。我在 PHP 中需要这个:
$pattern = '/((\A)|(<br\s\/>))(?P<G>[^:]*):/';
$description = preg_replace($pattern, '<b>$1</b>', $description);
谢谢。