Dim FieldRegex as CSV.GetField = New CSV.GetField 'This makes a new Regex object Dim FieldMatch as Match = FieldRegex.Match(Line) 'Apply the regex to a string . . . While FieldMatch.Success Dim Field as String If FieldMatch.Groups(1).Success Field = FieldMatch.Groups("QuotedField").Value Field = Regex.Replace(Field, """""", """") 'replace two double quotes with one Else Field = FieldMatch.Groups("UnquotedField").Value End If Console.WriteLine("[" & Field & "]") ' Can now work with 'Field'.... FieldMatch = FieldMatch.NextMatch End While ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl