Remove bracket from strings

Hey Koders, I’m trying to spilit text from strings it working to i’m getting result text in Brackets.
I’m Using Spinner component. It has 3 strings 1 Min, 2 Min,5 Min.
I wanted to remove Min text from strings. So i used this block.
blocks (94)
but So result should be 1 but result is showing (1). How can i do this.
Thank you for reading

Use the Select Item from List block to access the value inside the list.

thats not what i’m saying. I’m getting value but the value is being in bracket.

This happens because the result of the division of the text is not a text string but a list and the lists are enclosed in parentheses.

to access one of the values ​​of the zebes list select it with select list index


can you please share blocks?


“Selects the item at the given index in the given list. The first list item is at index 1.”

Well I have tried select list item but still not working.
blocks (95)

Hahaha, split text block makes a list from a string.

Remember that your blocks are executed from the right site to the left site.

Do one thing, catch the whole in a global or local variable and use replace segment block then.

Try this.
For the spinner index 1 is 1 Min, index 2 is 2 Min and index 3 is 5 Min. When you select an item from the spinner, assuming i selected index 2 my result will be 2 Min. Now to remove the Min, we replace all text at segment Min aand we replace it with empty text- Therefore you’ll be left with 2. Try with index 1 and 3.

First split, and then select the first item

1 Like

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