Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As String = "hello . How are you there I am Leanord This world is beautiful"
Dim i As Integer = Len("I am Leanord")
Dim s As String = x.Substring(InStr(x, "I") - 1, i)
MessageBox.Show(s)
End Sub
Dim x As String = "hello . How are you there*I am Leanord*This world is beautiful"
Dim a() As String = x.Split("*"c)
Dim i As Integer
For i = 0 To a.GetUpperBound(0)
MessageBox.Show(a(i))
Next
End Sub
Dim x As String = "hello. How're you there ? "
Dim s As String = x.Replace("'", "''")
MessageBox.Show(s)
'Don't worry it will go into the DB as one single quote.