Linq Query for a data table operation

Hi All,

I need help with the Linq Query for folowing scenario can someone help please.

I have a data table and 1 particular column in the data table is as below.
I just want to validate the particular column value by value.Check for extra spaces and combine it as one space to use the data table in the next scenarios.
image

Can someone help please.

Hi,

Can you try the following using InvokeCode?

dt.AsEnumerable.ToList.ForEach(Sub (r)
    r("Column3")=System.Text.RegularExpressions.Regex.Replace(r("Column3").ToString," +"," ")
End Sub
)

Sample20230512-4L.zip (2.8 KB)

Regards,