I am trying to replace 5x spaces in a string with a comma "," - I have tried regex and ConvertString.Replace (" ", ",")
which I thought would be the easiest way but I am failing.
I have a string = "Booth 3 10:00 more guys a948484 23.01.2022"
and would like to create an array
Dim s As String = "Booth 3 10:00 more guys a948484 23.01.2022"
Log(s)
Dim ar() As String = Regex.Split(" ",Regex.Replace("\s+",s," "))
Dim sb As StringBuilder
sb.Initialize
For Each m As String In ar
Log(m)
sb.Append(m).Append(" ")
Next
Log(sb.ToString)
Dim s As String = "Booth 3 10:00 more guys a948484 23.01.2022"
Log(Regex.Replace("\s+",s,","))
For Each m As String In Regex.Split(",",Regex.Replace("\s+",s,","))
Log(m)
Next