VB.NET Split string as word


''' <summary>
    ''' Split the words in string on non-word characters.
    ''' This means commas and periods are handled correctly.
    ''' </summary>
    Private Function SplitWords(ByVal s As String) As String()
 '
 ' Call Regex.Split function from the imported namespace.
 ' Return the result array.
 '
 Return Regex.Split(s, "\W+")
    End Function