I am trying to remove script and link tags from a string. Below is what I got till now.
Code
rawHtml = rawHtml.Remove(rawHtml.IndexOf("<script"), (rawHtml.LastIndexOf("</script>") -
rawHtml.IndexOf("<script")) + 5);
rawHtml = rawHtml.Remove(rawHtml.IndexOf("<link"), (rawHtml.LastIndexOf("/>") -
rawHtml.IndexOf("<link")) + 3);
Is there better way without manually writing the numbers ?