Excel split data

Hi team,
I want to middle value after/ befor/
001200869048.

Hi @AsadPathan2665

You can try with Regular expression

Approach 1

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=CMS\D)\d+").Tostring

image

Approach 2

System.Text.RegularExpressions.Regex.Match(YourString,"\d+(?=\D)").Tostring

image

Regards
Gokul

Hello @AsadPathan2665
Try this

=CurrentRow("Particulars").Split("/")(1).tostring.trim
1 Like

@AsadPathan2665 ,
One of many ways.

Split(Split(CurrentRow("Particulars").ToString,"CMS/")(1),"/")(0)

Regards,

Hi @AsadPathan2665

Use the Regex expressions to extract the required data
Use the “For each row in datatable” activity to iterate every row in datatable. Use the “Find matching pattern” activity to give the regex expression and save it in the variable and you can use it for further use.
Check the below image for the regex expression
image

Hope it helps!!

Hi @AsadPathan2665 ,

Easiest way is:
to use an assign operation inside the loop for datatable:
assign

particularsNumber= row(“Particulars”).toString.Split({“/”},StringSplitOptions.None)(1).Trim

This would work.

Thanks,
Aditya