Hello

1.I have a String likes "#0000003#" ,I want to split it to " "+ 0000003.

2.So I try to use String_Split to split "#" in the string.

3.But after split the String it looks like " " + 0000003 + " ", I don't need  the " " in the end of the List .

What can I do? Thank you very much.



Solution

Hey Albert,

String_Split alone won't do exactly what you need. You can either process the # symbols in a loop and decide how to handle the last one, or you can continue using String_Split and remove the last element of the list with the ListRemove action.

Solution

Hi Albert,

You can use ListFilter to get a new list without these elements.

You may also look into Forge to see if you find any Text extension that has a Split method that allows you to ignore empty items.

You can iterate the list and use only those elements that have something in it.

Cheers.

Albert_Li wrote:

Hello

1.I have a String likes "#0000003#" ,I want to split it to " "+ 0000003.

2.So I try to use String_Split to split "#" in the string.

3.But after split the String it looks like " " + 0000003 + " ", I don't need  the " " in the end of the List .

What can I do? Thank you very much.



Hello Albert,

You can do a ListRemove after the String_Split, and remove the last item. Don't know if that is what you want.


Best regards,

Miguel

Afonso Carvalho wrote:

Hey Albert,

String_Split alone won't do exactly what you need. You can either process the # symbols in a loop and decide how to handle the last one, or you can continue using String_Split and remove the last element of the list with the ListRemove action.

Thank you very much .