Dim mat1, mat2 As Matcher
Try
' Hebrew/Greek text inside <heb>...</heb>
mat1 = Regex.Matcher("<heb[^>]*>([^<]+)</heb>", stext)
' English gloss text inside <gloss>...</gloss>
mat2 = Regex.Matcher("<gloss>([^<]+)</gloss>", stext)
Do While (mat1.Find And mat2.Find)
' Concatenate Hebrew/Greek text with corresponding English gloss
retText = retText & mat1.Group(1) & " <sub> " & mat2.Group(1) & " </sub> "
Loop
Catch
Log(LastException)
End Try