Split Web Page Extention using C#.Net
using System.Text.RegularExpressions;
string splitWebPageExtension(string webPage, string extension,int idx)
{
Regex Splitter = new Regex(extension);
String[] Parts = Splitter.Split(webPage);
string st = Parts[idx];
return st;
}
string webPage = "http://dotnettechrocks.blogspot.in/ ";
string str = splitWebPageExtension(webPage, ".in", 0);
MessageBox.Show(str);
Result :http://dotnettechrocks.blogspot
using System.Text.RegularExpressions;
string splitWebPageExtension(string webPage, string extension,int idx)
{
Regex Splitter = new Regex(extension);
String[] Parts = Splitter.Split(webPage);
string st = Parts[idx];
return st;
}
string webPage = "http://dotnettechrocks.blogspot.in/ ";
string str = splitWebPageExtension(webPage, ".in", 0);
MessageBox.Show(str);
Result :http://dotnettechrocks.blogspot