iOS shortcuts Text

Hi,

I’m trying to work out how to remove empty lines from a Siri shortcuts text.

Example the text being inserted reads like this

One.
——-

Two.
Three.
——-

Four.

I want the text returned to be

One.
——-
Two.
Three.
——-
Four.

Try this. Replace consecutive new lines with 1.

1 Like

I ended up finding another way that gets the same result.

Aside from empty not being the same as blank, if you want to also account for a final line being blank/empty after a populated penultimate line, this addition should address that.

Hope that helps.

1 Like