Advertisement
339r

Regex e.g

May 21st, 2019
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.13 KB | None | 0 0
  1. Dim htmlmy As String
  2.             htmlmy = (bg.DownloadString("https://www.instagram.com/graphql/query/?query_id=17888483320059182&variables=%7B%22id%22:%22" & eb(0) & "%22,%22first%22:50,%22after%22:null%7D"))
  3.             Try
  4.                 Dim findtext2 As String = "(?<=" & """" & "shortcode" & """" & ":" & """" & ")(.*?)(?=" & """" & ")"
  5.                 Dim myregex2 As String = (htmlmy) 'Your HTML code
  6.                 Dim doregex2 As MatchCollection = Regex.Matches(myregex2, findtext2)
  7.                 Dim matches2 As String = ""
  8.                 Dim sor As String = ""
  9.                 For Each match2 As Match In doregex2
  10.                     sor = match2.ToString
  11.                     If Not TextBox1.Text.Contains(sor) Then
  12.                         scode.Items.Add(match2)
  13.                         matches2 = matches2 + match2.ToString + Environment.NewLine
  14.                     End If
  15.                 Next
  16.                 TextBox1.AppendText(matches2)
  17.                 Label1.Text = scode.Items.Count
  18.             Catch ex As Exception
  19.                 'MsgBox("Something is wrong, Mabey this account is Private!")
  20.             End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement