public void ReadDataFromFile(string sourcePath, string destinationPath) { this.destWithExt = _csvfile.AddExtension(destinationPath); List <string> lines = File.ReadAllLines(sourcePath).ToList(); foreach (string line in lines) { string strRegex = @"(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])\s(0[1-9]|1[012])[:](0[1-9]|[12345][0-9])[:](0[1-9]|[12345][0-9])\s(INFO|WARN|DEBUG|TRACE|ERROR|EVENT)"; _csvfile.SetRegex(strRegex); WriteDataTotheFileInFormat(line); } }