我在尝试替换以下内容的字符串中有 HTML:
<td colspan="12" bgcolor="#460F59">  <font color="#ffffff"><b>IT </b>
<b>214 </b>– <font color="#FFFFFF"><b>Fund of Software Develop </b>
<b> (4 Credits)</b></font></font></td>
和:
<td colspan="12" bgcolor="#460F59">  <font color="#ffffff"><b>IT </b>
<b>214 </b>– <font color="#FFFFFF"><b>Fund of Software Develop </b>
<b> (4 Credits) - Prereq: IT 210</b></font></font></td>
我意识到引号需要修正,但我怎样才能表明 HTML 位于 3 个单独的行上?
实际代码:
s.Replace("<td colspan="12" bgcolor="#460F59">  <font color="#ffffff"><b>IT </b>
<b>214 </b>– <font color="#FFFFFF"><b>Fund of Software Develop </b>
<b> (4 Credits)</b></font></font></td>", "<td colspan="12" bgcolor="#460F59">  <font color="#ffffff"><b>IT </b>
<b>214 </b>– <font color="#FFFFFF"><b>Fund of Software Develop </b>
<b> (4 Credits) - Prereq: IT 210</b></font></font></td>");