How to Use replace command for in C#? <pre><code>static void Main(string[] args) { string t="&lt;html&gt; &lt;head&gt; &lt;link rel='stylesheet' type='text/css' href='http://www.taxmann.com/css/taxmannstyle.css' /&gt; &lt;/head&gt; &lt;body &gt;&lt;html&gt;&lt;body style='background-color:Black;font-size:30px;color:#fff;'&gt;&lt;html&gt;\r\n&lt;head&gt;&lt;link href='http://www.taxmann.com/TaxmannWhatsnewService/Styles/style.css' rel='stylesheet' type='text/css' /&gt;\r\n&lt;title&gt;Finmin Aims to Halve Net Bad Loans of PSBs&lt;/title&gt;\r\n&lt;style type=\"text/css\"&gt;\r\nbody{font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:18px;text-align:justify;}\r\n.w100{width:100%;}\r\n.fl-l{float:left;}\r\n.ffla{font-family:Arial, Helvetica, sans-serif;}\r\n.fs18{font-size:18px;}\r\n.mart10{margin-top:10px;}\r\n.fcred{color:#c81616;}\r\n.tc{text-align:center;}\r\n.tu{text-transform:uppercase;}\r\n.lh18{line-height:18px;}\r\n&lt;/style&gt;\r\n&lt;/head&gt;\r\n&lt;body&gt;\r\n&lt;div class=\"w100 fl-l\"&gt;\r\n&lt;div class=\"w100 fl-l ffla fs18 mart10 fcred ttunderline tc tu\"&gt;Finmin Aims to Halve Net Bad Loans of PSBs&lt;/div&gt;\r\n\r\n&lt;div class=\"w100 fl-l lh18 mart10\"&gt;Concernedover the rising bad loans of the state-run banks, the finance ministry is working out a plan to reduce their net non-performing assets (NPAs) to 1% of net advances by the end of the current financial year.&lt;/div&gt;\r\n\r\n&lt;/div&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;\r\n&lt;/body&gt;&lt;/html&gt;&lt;/body&gt;&lt;/html&gt;" string resultValue = t.Replace("&lt;html&gt;&lt;head&gt; &lt;link rel='stylesheet' type='text/css' href='http://www.taxmann.com/css/taxmannstyle.css' /&gt;&lt;/head&gt; &lt;body &gt;&lt;html&gt;", " &lt;html&gt;&lt;head&gt; &lt;/head&gt; &lt;body &gt;&lt;html&gt;"); //its not working Console.WriteLine(resultValue); } </code></pre> <p>This is my code But i m unable replace <code>resultValue</code>. </p>