Split string by number and stored number in Excel ID Column

Hi I want to seperate Name&ID and have to stored ID no in ID Column excel

If string Nikita2233 it split to Nikita and 2233
How can I do it?

Thanks in advance.
I’m attaching Screenshot Also
Excel File
Test.xlsx (9.4 KB)
Output Should be(ID Number) stored in ID column

Hello @kaveri_satpute

You can check the below post.

1 Like

Welcome to the forum

we can use regex and referring to the groups

  • Excel Application Scope and read range - dtData

  • For each row Activity | row in dtData

  • Assign Activity:
    myMatch = System.Text.RegularExpressions.Regex.Match(row(0).toString, "(.*?)(\d+)")

  • Assign Activity: row(0) = myMatch.Groups(1).Value

  • Assign Activity: row(1) = myMatch.Groups(2).Value

And writing back dtData to Excel if it is needed

HI @kaveri_satpute

Welcome to forum community!!

You can try with regex expression

Name - System.Text.RegularExpressions.Regex.Match(StringVal,"(.*?)\d+").Groups(1).ToString

Number - System.Text.RegularExpressions.Regex.Match(StringVal,"\d+").ToString



try this workflow->
Sequence.xaml (11.6 KB)

I hope it will help you.
1 Like

Hi Vaibhav,

Thank you so much
Can I know which package your working for Regex method


Its a vb expression .you can directly use it or you can also import this from import panel->
have a look on it.