我需要添加一个跨度来更改文本颜色,但前提是文本遵循某种格式。例如:
<div>
Random text.
<br>
x. I want to add a span to this line
<br>
Not this one.
<br>
x. Yes to this.
<br>
x. And this!
</div>
在此示例中,我想将 a 添加span到以 . 开头的行中x.。我无法更改格式并且文本不在“p”内。