How to extract the substring from a data table column

I have a DataTable with only one column and I want to extract the specific portion from each row of that data table

This is my Data table

I want to extract the portion that is on the left side of three hyphens (“—”)
The output data table should be like this

1 Like

@Sami_Rajput try this
basically in for each row activity
CurrentRow("Document") = System.Text.RegularExpressions.Regex.Split(CurrentRow("Document").ToString, "---")(0)
uipathF.xaml (9.3 KB)

1 Like

is the data come in the same format? I would use the regex capturing groups pattern =>

Regex pattern = (\w{3})-(\d{8})

in for each row


1 Like


1 Like

no problem, good luck :slight_smile:

1 Like

Thanks for your help!
Currently, I am not so familiar with REG-Ex, but I will try this for sure!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.