Split or replace linkebreaks in plain text?

Is it possible to split or replace linebreaks in plain text?

I have a plain text string with an uncertain number of items, for example:
A
B
C

And aim to add html to each item to turn it into a numbered list:

  1. A
  2. B
  3. C

Or is there a smarter way of doing this?

Thanks!

Hi @Zbulo ,

You can use the following code: <li>{{join(split(1.Text; newline); "</li><li>")}}</li>. This code will split your text into array elements and then join them again with the HTML tags as a separator. Finally, you need to add the first and last tags around the function to get the HTML list items.

I have attached a blueprint (4.0 KB) for your reference so you can check what I did in more detail.

I hope this solution helps.
Glenn - Callinetic

4 Likes

Thanks @Callinetic, smart way, I didn’t think of the newline. :slight_smile: