I have some relative URLs like the followings:
<a href="/some/folder/index.html">Sports</a>
<a href="some2/folder2/default.htm">Weather</a>
What I want to do:
<a href="http://www.domain.com/some/folder/index.html">Sports</a>
<a href="http://www.domain.com/some2/folder2/default.htm">Weather</a>
Basically, I want to insert the domain name at some index. I can match the regular expression without any problem and I did not want to use the groupping in regular expression, because then I have to use a while loop. So I wanted to use the regular expression replace function to enter the domain name in C#.
This is something I have used in the past -
(?<regSRC>href=[^"]*["])
Then I could easily replace the entire text in C# with a different one using ${regSRC} variable. I wanted to use a similar trick for this solution - Can anyone help?
Thanks.
<a href="/some/folder/index.html">Sports</a>
<a href="some2/folder2/default.htm">Weather</a>
What I want to do:
<a href="http://www.domain.com/some/folder/index.html">Sports</a>
<a href="http://www.domain.com/some2/folder2/default.htm">Weather</a>
Basically, I want to insert the domain name at some index. I can match the regular expression without any problem and I did not want to use the groupping in regular expression, because then I have to use a while loop. So I wanted to use the regular expression replace function to enter the domain name in C#.
This is something I have used in the past -
(?<regSRC>href=[^"]*["])
Then I could easily replace the entire text in C# with a different one using ${regSRC} variable. I wanted to use a similar trick for this solution - Can anyone help?
Thanks.