I got more of a question rather than that of a problem (Although a problem too)
Basically i have a sentence (String) that is in questionin and need to split it into single words so i need to remove all of the ,.""'';:!&^?/\ spaces etc.
when use this function it seems to slightly work
Textdelimiter = “/<[^>]*>/g “ removing all of the brackets etc but not full stops.
I know it is a regular expression but thought i could add to it eg full stop question marks all the things that must be removed to leave pure strings of words.
Dim x As String = "asdf 3434 asd /.,/2asfas"
Dim y As String
Dim z As New ArrayList
For Each C As Char In x.ToCharArray
If Char.IsLetterOrDigit(C) Then
y &= C
Else
If y <> "" Then
z.Add(y)
y = ""
End If
End If
Next
If y <> "" Then z.Add(y)
Dim arr As String() = z.ToArray(GetType(String))
Exactly, it is basically creating an array of words composed strictly of letters and digits. For the example, the following array of words is created: "asdf","3434","asd","2asfas".
Bookmarks