检测 Google Sheet 中单元格中行的开头

Detecting the beginning of the line in a cell in Google Sheet

有没有办法让我找到单元格中行首的位置?

我想用 HTML span 封装标签。

Cast Animation: 0.25 + 0.67
Cast Range: 575
Radius: 0 ( 375)
Self Damage: 75 / 100 / 125 / 150 ( 123 / 148 / 173 / 198)
Enemy Target Damage: 120 / 165 / 210 / 255 ( 168 / 213 / 258 / 303)
Allied Target Heal: 120 / 165 / 210 / 255 ( 168 / 213 / 258 / 303)
5.5 ( 4.675) 50
Can be cast on Spell Immune allies.
Cannot be cast on spell immune enemies.
Self damage pierces spell immunity.
Blocked upon impact, as primary and secondary target, therefore, Abaddon still loses health.
Can be disjointed by enemies and allies.

您无法检测到行首,但可以检测到换行符 \n

然后,您可以将每一行封装在 <span></span> 标签中,例如如下:

="<span>"&regexreplace(A1,"(\n)","</span><span>")&"</span>"

这里A1是单元格引用,显然你可以根据自己的需要修改。