I have a string:
string = "Hello.world, have a nice day"
Is there a way to split the string with point or comma as delimeter, but only retain the delimeter into the array? (whitespace is separator but is not retain)
['Hello','.','world',',','have','a','nice','day']
which delimeter for regex.split(delimeter)
would be preferable?
and this is my code
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim arr As String() = Regex.Split(TextBox1.Text, "[.|\,]")
For Each i As String In arr
Console.WriteLine(i)
Next
End Sub
sorry for bad english