Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
String s = "Intesa Sanpaolo ST: the downside prevails <ISP.MI>";
String result = s.SubString( s.IndexOf( '<' ), s.IndexOf( '>' ) - s.IndexOf( '<' ) );
public string GetWebPageTitle(string url)
{
string regex = "(?<=title=\")(.*?)(\")";
string title = string.Empty;
FileStream fs = new FileStream(Server.MapPath(url), FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(fs, Encoding.UTF8);
//get just the first two lines
title = sr.ReadLine();
title += sr.ReadLine();
Regex ex = new Regex(regex, RegexOptions.IgnoreCase);
title = ex.Match(title).Value.Replace("\"", "").Trim();
sr.Close();
fs.Close();
return title;
}