Is there a way to split a string at the first occurrence of ","?

not every occurrence of the separator. Thanks.

text_split

3 Likes

This is what you are looking for?

2 Likes

I was trying segmenting, this would also work, but ABG 's solution is the best. Used split lots of time, never realized that there is a pull down menu there.

2 Likes

I didn't find this code block at first look in the block section :frowning: , @ABG's code block is more concise.

1 Like

Also, is there a way to split at the last separator? there's split at any with at(list), don't know how to use it.

Split at (list) works like this

image

1 Like

Just split at , then use length of list to get the last item.

2 Likes

like split twice, the second to get length as index, am i putting computer at too much work:)

Thanks, good to know.

1 Like

you don't have to....

image

1 Like

Thanks for the alternative, the block looks bigger. I will take the split twice way, it's better than my current: split all, reverse list, take first. sorry my i7

Is there a reverse text block?

Then the last delimiter would become the first delimiter.

To un-reverse text, reverse it again.

Reverse list, actually my way is shorter

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.