QUOTE(oyline @ 5 May, 2008 - 09:33 PM)

vb
Public Class Form1
Private Function SplitSentences(ByVal sSourceText As String) As ArrayList
' create a local string variable
' set to contain the string passed it
Dim sTemp As String = sSourceText
' create the array list that will
' be used to hold the sentences
Dim al As New ArrayList()
Dim Regex As String
' split the sentences with a regular expression
Dim RegexSentenceParse As String() = _
Regex.Split(sTemp, "(?<=['""A-Za-z0-9][\.\!\?])\s+(?=[A-Z])")
' loop the sentences
Dim i As Integer = 0
For i = 0 To RegexSentenceParse.Length - 1
' clean up the sentence one more time, trim it,
' and add it to the array list
Dim sSingleSentence As String = _
RegexSentenceParse(i).Replace(Environment.NewLine, String.Empty)
al.Add(sSingleSentence.Trim())
Next
End Function
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
ListBox1.ClearSelected()
End Sub
End Class
EDIT: Code tags added =>

=============================================
Use mid function to do this
for start=1to len(text)
mid("text as string",start,len(text)) compare with particular string