Hello, i wrote a program and i can get the contents of a webpage. Now i want to get some values from it.
For example my page is something like this
My name : Bob
My surname : Bob2
My name : Bob3
My surname : Bob4
i want to get Bob,Bob2,Bob3,Bob4.
i put page containts to a richtextbox
so far i managed to strip as much things as i can (but i get a lot of white lines)
i get something like thisCode:Regex reg = new Regex(@"\s*"); result = reg.Replace(result, ""); result = Regex.Replace(result, @"<.*?>", "\n"); result = Regex.Replace(result, @"[A-Z][1-9]", "\n"); result = Regex.Replace(result, @"[^\w\.@-]", "\n"); string[] words = result.Split(' '); foreach (string word in words) { status_richTextBox.AppendText(word); }
How can i get only the values i want ?Code:(empty line) (empty line) (empty line) (empty line) My name Bob My surname Bob2 My name Bob3 My surname Bob3




Reply With Quote