I really have serious problems with regex. I need to get all text between 2 strings, in this case that strings are
<span class="user user-role-registered-member">
Dim mystring As String = "<br>Terms of Service<br></br>Developers<br>"
Dim pattern1 As String = "(?<=<br>)(.*?)(?=<br>)"
Dim pattern2 As String = "(?<=</br>)(.*)(?=<br>)"
Dim m1 As MatchCollection = Regex.Matches(mystring, pattern1)
Dim m2 As MatchCollection = Regex.Matches(mystring, pattern2)
This does the job easily and beautifully. It won't return a match when there is no text inside the span, so you do not need to worry about empty matches. It will however return groups with only whitespace in them.
<span class=""user user-role-registered-member"">(.+)</span>
Test it out here.