Я сделал уже. Не парься.
Код:
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace ConsoleApplication6
{
internal class Program
{
private static void Main(string[] args)
{
string[] lines = File.ReadAllLines("c:\\temp\\gudron.csv", Encoding.GetEncoding(1251));
var col1 = new List<string>();
var col2 = new List<string>();
var result = new List<string>();
foreach (string line in lines)
{
string[] ss = line.Split(';');
col1.Add(ss[1]);
col2.Add(ss[3]);
}
foreach (string s in col1)
{
if (string.IsNullOrEmpty(s))
continue;
string match = col2.Find(x => x.Contains(s));
result.Add(string.IsNullOrEmpty(match) ? s : match);
}
File.WriteAllLines("c:\\temp\\gudron_result.csv", result.ToArray(), Encoding.GetEncoding(1251));
}
}
}}