How can I efficiently process a delimited text file?
<p>I'm simply trying to execute <code>File.ReadAllLines</code> against a specific file and, for every line, split on <code>|</code>.  I have to use regex on this one.  </p>

<p>This code below doesnt work, but you'll see what i'm trying to do:</p>

<pre><code>string[] contents = File.ReadAllLines(filename);
string[] splitlines = Regex.Split(contents, '|');
foreach (string split in splitlines)
{
    //Regex line = content.Split('|');
    //content.Split('|');
    string prefix = prefix = Regex.Match(line, @"(\S+)(\d+)").Groups[0].Value;
    File.AppendAllText(workingdirform2 + "configuration.txt", prefix+"\r\n");
}
</code></pre>
