منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : مشكلة في regex
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم 
كيف حالكم يا أصدقاء ان شاء الله تكونو ب الف خير
عندي مشكلة في regex

أريد سحب هذه البيانات في ليست فيو
هذه محاولتى اتمنى تصحيح الخطأ لانه لا يجلب كل الاسطر
كود :
           Dim farfour As New ListViewItem

           Dim pageSource = New WebClient().DownloadString("https://www.livesoccertv.com/fr/channels/bein-sports-arabia-1-hd/")
           Dim dat As MatchCollection = Regex.Matches(pageSource, "(?<=df='H:MM'>).+(?=<\/span><span)")
           Dim mtch As MatchCollection = Regex.Matches(pageSource, "(?<=title="").+(?="" id=)")
           Dim liga As MatchCollection = Regex.Matches(pageSource, "(?<="" title="".+>).+(?=<\/a> <\/td>)")


           For i = 0 To dat.Count - 1

               farfour.Text = dat(i).Value
               farfour.SubItems.Add(mtch(i).Value)
               farfour.SubItems.Add(liga(i).Value)
               ListView1.Items.Add(farfour)
           Next
تفضل اخي تم التعديل على الكود

كود :
Dim pageSource = New WebClient().DownloadString("https://www.livesoccertv.com/fr/channels/bein-sports-arabia-1-hd/")
       Dim dat As MatchCollection = Regex.Matches(pageSource, "(?<=df='H:MM'>).+(?=<\/span><span)")
       Dim mtch As MatchCollection = Regex.Matches(pageSource, "(?<=title="").+(?="" id=)")
       Dim liga As MatchCollection = Regex.Matches(pageSource, "(?<="" title="".+>).+(?=<\/a> <\/td>)")

       For i = 0 To dat.Count - 1
           Dim farfour As New ListViewItem(dat(i).Value)
           farfour.SubItems.Add(mtch(i).Value)
           farfour.SubItems.Add(liga(i).Value)
           ListView1.Items.Add(farfour)
       Next