Dim poMatch As Matcher
Dim piCount As Int
poMatch = Regex.Matcher("\w+(-\w+)*", "There are seven words in this sentence.")
Log(poMatch.GroupCount)
Do While poMatch.Find
Log("Found " & poMatch.Match)
piCount = piCount + 1
Loop
Log(piCount & " words.")