C# Regex quick help
<p>I'm trying to read a text file, and then break it up by each line thats is split by a "\n".  Then Regex it  and write out the regex.</p>

<pre><code>string contents = File.ReadAllText(filename);
        string[] firefox = filename.Split("\r\n");
        string prefix = prefix = Regex.Match(firefox, @"(\d)").Groups[0].Value;
        File.AppendAllText(workingdirform2 + "configuration.txt", prefix);
</code></pre>

<p>string[] firefox = filename.Split("\r\n"); doesnt exactly work.  </p>

<p>What I want to do is run a regex foreach line of contents and then write out each line after the regex</p>

<p>So...</p>

<p>filename:<br>
Hero123<br>
Hero243<br>
Hero5959  </p>

<p>writes out to:<br>
13<br>
243<br>
5959  </p>

<p>Well everybody is suggesting something off the base in which i started.  the ending result will be about a 20 line regex with Ints.  I've got to parse it out line by line.</p>
