How can I simplify this?

This is a list:point_down:

STITLE@@The sky is blue.SLINK##17773202PDATA??2KTkb69/apppicture-1.jpgSALL@

STITLE@He is a good boy.SLINK#17773127PDATA?cg0fYrp/apppicture-1.jpgSALL@

STITLE@Do you know her?SLINK#17772963PDATA?y5mxd83/apppicture-1.jpgSALL@

Special identifier:point_down:

STITLE@ ----------------- SLINK# ----------- PDATA? ------------- SALL@

What I want to do?:point_down:

I want to extract three data (sentence in between those identifier) and create a list or three different list.

This what I have done so far…But is there any way to simplify it?:point_down:

replace STITLE@ by empty string
replace SALL@ by empty string
replace SLINK# by PDATA?
then split remaining text by PDATA? to get a list of the 3 items you are looking for

Taifun

1 Like

Should I have to use the for each item in list block?

Try this to simplify your current blocks.

EDIT:
If you just want to get a specific range of a text then you should use this:
blocks%20(1)

4 Likes

Yeah…It’s good to use the procedure block…And obviously this:point_up_2: block will decrease the number of blocks but what do you think about this one :point_down:

What about trying the suggestions?
You can make your own private kode jam. :wink:

Taifun

4 Likes

Mika’s one is good to reduce the blocks count but I am trying to understand yours one so…

Suppose the list item looks like this:point_down: (Suppose there are 50 items in the list)

The sky is blue.SLINK#17773202PDATA?2KTkb69/apppicture-1.jpg

Special identifier:point_down:

SLINK# ------ PDATA?

Is this possible to split the list from SLINK# and PDATA? to get those three part of the data…

I mean :point_down:

1st list  -->> The sky is blue   
 
  2nd list --->>   17773202

    3rd list   --->> 2KTkb69/apppicture-1.jpg

So how is your private kode jam going?
Any screenshot of your blocks?
My suggestion will result in one large list…

Another possibility is to create a csv table, assuming there are no commas in your texts…

  1. replace SLINK# by ,
  2. replace PDATA? by ,
  3. replace SALL@ by \n
    Now you have a csv table
  4. use the list from csv table block to convert the csv table into a list of lists

Taifun

1 Like