Following code will get you title using regular expression
Regex regex = new Regex("<title>(?<title>.*?)</title>", RegexOptions.IgnoreCase);Following code will get you meta tag My_Meta
Match titleMatch = regex.Match(html);
string title = titleMatch.Groups["title"].Value;
Regex regex = new Regex("<META +NAME=\"(?<name>My_Meta*?)\" +CONTENT=\"(?<content>.*?)\" */?>", RegexOptions.IgnoreCase);
Match metaMatch = regex.Match(html);
title = metaMatch.Groups["content"].Value;
No comments:
Post a Comment