Hi, i have a regex below that works great
What i need to know is how to check if it returns nothing?Code:Dim Regex As New System.Text.RegularExpressions.Regex("<div><strong>You have (.*?)</a></div>") Dim matches As MatchCollection = Regex.Matches(thepage) For Each match As Match In matches TextBox3.Text = ("You have " & match.Groups(1).Value) Next
For example the above code lets me know if i have a private message, if i have then it tells me, if i have not then the regex wont grab anything.
In the source, if i have a message it will say "You have whatever"
If i do not then it wont have anything in the source.
I have tryed things like:
If matches.ToString = nothing
If matches.ToString = ""
but they don't work :/
Thanks for any help




Reply With Quote