Split numbers

Hi Friends,

Good Morning!!

I have a string which contains only numbers with delimeters in my mail : “MatchScoreDetails_TeamA: 1 | 1 | 2 | 1 | 0 |0 MatchScoreDetails_TeamB: 1 | 3 | 1 | 0 | 1 |0. I want to split it into an array. How to do that?

Thanks in Advance.

Split string activity with “|” as delimiter can be used to split the string, that will be stored in a String Array

@gokult

str = “MatchScoreDetails_TeamA: 1 | 1 | 2 | 1 | 0 |0”

String numbers = str.split(“|”.TocharArray)

1 Like

Thanks @lakshman

I will check and let you know.

1 Like

Hi @gokult

This will also work for you…

StringVariable.split("|"c)

The output of this will be a string array

Hello @gokult,

To know about split , take a look this one.

Regards
Balamurugan.S