I know how to search the body or the page source of the website using regex. However I want a result similar to browsers like firefox and chrome when you press ctrl F.
My current code.
Dim search As String = txtsearch.Text.ToLower
Dim target As String = web1.DocumentText.ToLower
Dim counter As Integer = 0
Dim m As Match = Regex.Match(target, search)
Do While m.Success
counter = counter + 1
m = m.NextMatch()
Loop
I'm currently using a WebBrowser and the code above will execute when the document completed.
Just an additional info. Searching the body or page source of the website will give a huge return. Example if I search the word "youtube" on youtube's body/page source I will get 40+ while if I do a ctrl f the result will be around 6 or less.