I find that I am in need of some help with this one...
I need to find all occurances of a pattern. Once found I need to replace all but the last occurance with a blank, and replace the last occurance with a different string.
Here's the string:
tmpString = Regex.Replace(tmpString, "<link .*?href=""(.*?)"" />", "<style type=""text/css"">" & FileContents & "</style>")
It will find all occurances of the <link href> tag for stylesheets, what I need to do is if there are 3 of them in the page, replace the first 2 with "", but replace the 3rd with the "<style..." as above