How do i extract specific data from a file?
<p>I have a file which has temperature data in it . I need to extract temperature from it and save the result with only temperatures in a new file.</p>

<p>This is the contents of the file :</p>

<pre><code>BCAST:000D6F00017620E9, 02=34.23
BCAST:000D6F00017620E9, 02=12.3
BCAST:000D6F00017620E9, 02=54.01
BCAST:000D6F00017620E9, 02=12.34
BCAST:000D6F00017620E9, 02=16.22
</code></pre>

<p>Need to extract the data after every = i.e 34.23,12.3,54.01 etc</p>

<p>I have tried using sub string but it can be used when i read the file as a string and it just makes a substring of first line , rest remains same.Following is my code.Please suggest !</p>

<pre><code>string temp2 = System.IO.File.ReadAllText(@"C:********\temperature.txt");
int c = temp2.IndexOf("=");
string temp3 = temp2.Substring(c + 1);
System.IO.File.WriteAllText(@"C:\*******\temperature2.txt",temp3);
</code></pre>

<p>Output of this code is :</p>

<pre><code>34.23
BCAST:000D6F00017620E9, 02=12
BCAST:000D6F00017620E9, 02=54
BCAST:000D6F00017620E9, 02=12
BCAST:000D6F00017620E9, 02=16
</code></pre>
