Replace string only at end of a line
<p>I'm using C# replace text in a string but failing when the text is at the end of line.</p>

<pre><code>string filepent = filehex.Replace(",,,,,\r\n", ",EMPTY,EMPTY,EMPTY,EMPTY,EMPTY"); 
</code></pre>

<p>I am loading a txt file into a filestream and then converting to a string. I want to replace a anywhere where it says ",,,,," at the end of a line. Currently the code above only changes it at the end of the file. At the end of a line where it should change it my hex editor says there is .. or 0D 0A</p>

<p>Thanks</p>
