04-08-20 05:48 PM
04-08-20 08:37 PM
06-08-20 11:20 AM
Add input and output 'Will be populated with each cell of column Dim columnList As List(Of String) 'Setting regex filter Dim filter As New Regex(regexFilter) Dim matchList As New List(Of String) 'Every cell in column to list columnList = (From r In CollectionIn.AsEnumerable() Select r.Field(Of String)(columnName)).ToList() 'Go through each cell For Each cell As String In columnList 'Add every match to list For Each regexMatch as Match in filter.Matches(cell) matchList.Add(regexMatch.Value) Next Next matchList = matchList.GroupBy(Function(x) x).Select(Function(x) x.First).ToList() CollectionOut = New DataTable CollectionOut.Columns.Add("Values", GetType(String)) For Each match As String in MatchList CollectionOut.Rows.Add(match) Next
07-08-20 08:53 AM