WolfmanTR_ Posted September 8, 2013 Share Posted September 8, 2013 <span style="color:white;font-weight: bolder;">Burdaki yazı çekilecek</span> span tagları arasındaki yazıyı naıl çekebilirim ?(Webbrowser ile) Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted September 8, 2013 Editor Share Posted September 8, 2013 (edited) var doc = new HtmlDocument(); doc.LoadHtml("...html içeriği..."); foreach (HtmlNode span in doc.DocumentNode.SelectNodes("//span")) { Console.WriteLine(span.InnerText); } Veya const string pattern = @"[a|span|td]>\s*?(?<text>\w+?)\s*?</\w+>"; Regex regex = new Regex(pattern, RegexOptions.Singleline); MatchCollection m = regex.Matches(x); List<string> list = new List<string>(); foreach (Match match in m) { Console.WriteLine(match.Groups["text"].Value); } Edited September 8, 2013 by pairs Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.