Instead of replace you can pick the needed ones and write it to same column or to a new column(Based on your requirement, if you want to write it to back to excel)
Can you try now.
Linq used -
(From d In DT.AsEnumerable
Let a = d(“A”).toString.Substring(0,d(“A”).toString.LastIndexOf(“,”) +3)
Let ra = New Object(){a}
Select dtOutput.Rows.Add(ra)).CopyToDataTable
@jntrk On top of it you can also use regex if you are not comfortable with substring mentioned by @prasath17
(From d In DT.AsEnumerable
Let a = system.Text.RegularExpressions.Regex.Match(d(“A”).Tostring,“\d+,\d{2}”).value
Let ra = New Object(){a}
Select dtOutput.Rows.Add(ra)).CopyToDataTable Test.xaml (7.7 KB)
okay okay I have managed to make it work. Thank you both very much. The problem was on the regex its given “,” but firstly it was “.” i replaced it “,” so the code you gave was executing first and not been able to find the “,” that why I got empty rows.