i have the following code:
HT_PostText = infoDS.Tables(0).Rows(x)(2
).ToString
()
Dim m As Match = Regex.Match(Regex.Replace(
HT_PostTex
t, "<.*?>", ""), "\W*((\w+(?:\W|$)+){0,14})
(.*)")
If m.Groups("3").Value() = "" Then
HT_Text.Text = m.Groups("1").Value()
Else
HT_Text.Text = m.Groups("1").Value() & "..."
End If
It produces the following: This is a test sentence which I don't want ...
I want the following: This is a test sentence which I do want...
As you may see, the difference is that the "..." connects to the last letter without taking a space. How can I make this happen?
Start Free Trial