You can use the following regular expression:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim text As String = "Today Date: Monday23,"
text = GetMatchingText(text)
End Sub
Private Function GetMatchingText(stringValue As String) As String
Dim pattern As String = "Today Date\:? ([A-Za-z]+ ?\d+),"
Dim result As String = String.Empty
If Regex.IsMatch(stringValue, pattern) Then
result = Regex.Match(stringValue, pattern).Groups(1).Value
End If
Return result
End Function
Replace your orginal string value with the return value of the function GetMatchingText.
A small explanation:
* the semicolon is optional so you can detect it with \:? (the question mark indicates it is optional)
* with the parenthesis ([A-Za-z]+ ?\d+) defines a group and the results you want
* [A-Za-z]+ indicates characters A to Z in both upper and lower case. The + defines 1 or more matches
* the \d+ is one or more digital numbers
The results can be accessed using the Groups collection. Groups(0) results in the entire match. The result you want is in the first group.