Split number into different parts



I have a string which contains only numbers: “4000124872345678”. I want to split it into an array. Each element contains 4 numbers(or characters): array(0)=“400”,array(1)=“1248”, array(3)=“7234” and array(4)=“5678”. How to do that?

Excel operation

Hi @hemanth_chinna,

Use this code to get the data array
System.Text.RegularExpressions.Regex.Split("4000124872345678", "(?<=\G.{4})")

using write line activity to print the splited data
string.Join(",",System.Text.RegularExpressions.Regex.Split("4000124872345678", "(?<=\G.{4})"))