i am having a string like ~AS DF~GHJ~K LE~RTYUVD~FE~GRF E~SRRRTR EDC~XCE
i want the string between "~" like
AS DF
GHJ
K LE
RTYUVD
FE
GRF E
SRRRTR EDC
You can try to use Split() function to split input string by tilde (~). Then, since you only interested in substrings between tilde, skip the first and last item in the split result :
Dim splitResult = "~AS DF~GHJ~K LE~RTYUVD~FE~GRF E~SRRRTR EDC~XCE".Split("~")
For Each r As String In splitResult.Skip(1).Take(splitResult.Length - 2)
Console.WriteLine(r)
Next
Result :

We skip the first item because it only has tilde at the right side
first item~.....
and we skip the last item because it only has tilde at the left side
.....~last item
Try like this
Method 1:
Dim s As String = "~AS DF~GHJ~K LE~RTYUVD~FE~GRF E~SRRRTR EDC~XCE"
' Split the string on the backslash character
Dim parts As String() = s.Split(New Char() {"~"c})
' Loop through result strings with For Each
Dim part As String
For Each part In parts
Console.WriteLine(part)
Next
Method 2:
Dim s As String = "~AS DF~GHJ~K LE~RTYUVD~FE~GRF E~SRRRTR EDC~XCE"
Dim words As String() = s.Split(new String() { "~" },
StringSplitOptions.None)