(
From row In inputDT
Group row By k=row(“Reference”).ToString +“-”+ row(“Amount in local currency”).toString
Into grp = Group
Let conv =k.Split(“-“c)(0).ToString
Let b = (
From r In Enumerable.Range(1, grp.Count)
Let a = If(grp.Count.Equals(1), New Object(){conv}, New Object(){conv+”.”+r.ToString})
Select a
)
Select b
From rowArr In b
Select outDT.Rows.Add(rowArr)
).copyToDataTable
@Tanzill_Ahsan
requested code is a LINQ statement but not regex
Group the data from input by the reference and the currency
if the group has more then 1 members add a counter on the reference
add the result to outDT
it coulld look like
123 $
123 $
124 $
123 €
out:
123.1
123.2
124
123
in case of you would like to run this statement we would suggest to simplify it as well