0

I am trying to scrap using system.net and regular expressions a web page that looks like in the picture in order to get info like Created By: see the picture!

Here is my code so far:

String html = web.DownloadString("https://..");
            MatchCollection m1 = Regex.Matches(html, @"<div>\s*(.+?)\s*</div>", RegexOptions.Singleline);

            foreach (Match m in m1)
            {
                string tarif = m.Groups[1].Value;
                tarife.Add(tarif);

When I tried to inspect the element in Chrome it looks something like this:

inspect element from Chrome

How can i use regex to extract the name, anyone who can advise me?

Răzvan Bălan
  • 33
  • 1
  • 13

1 Answers1

0

Do you mean like that?

var str = "dsGHsal TDascultu sdOfsaf JParker OFHlsdjfls"
var re = /\b[A-Z]{2}[a-z]+/g
matches = str.match(re)       //["TDascultu", "JParker"]
grabantot
  • 2,111
  • 20
  • 31
  • First of all, sorry in advance for my beginner level. I think it's correct, but i have to scrap this from a html page. The plan is to identify that name and write it to a textbox and i don't seem to know how to include the filter in my syntax. – Răzvan Bălan Jan 30 '16 at 20:13