I want to copy select parts of one file into another with C#
For example, suppose I have a file with following contents:
<div id="1"> contents of this div.. </div>
<div id="2"> contents of this div.. </div>
<div id="3"> contents of this div.. </div>
Now if I want to copy only the line <div id="2"> contents of this div.. </div>
into a new file. Then how can i do this efficiently?