Prev: Visual Basic Setup Problems
Next: Pset method in VB.net
From: Pascal on 31 Jan 2010 06:01 How to store all the words of a text in a table, modify some of them, then reconstruct the text by retaining the original punctuation? I tried this: words = TextBox1.Text.Split(New String() {" "c, ","c, "."c, ":"c, ";"c, "?"c, "!"c, "'"c, "`"c, "-"c}, StringSplitOptions.RemoveEmptyEntries) then : Dim WordsSpan = words.Clone Dim word As String For Each word In words word = ("<span class=""blue"" onclick=""verif(this)"">" + word + "</span>") TextBox2.Text += word Next so the text " Les poules du couvent couvent l'obscurit� la nuit. Pourquoi? moi, eux-m�mes! radis noirs: s�rieux" becomes: <span class="blue" onclick="verif(this)">Les</span><span class="blue" onclick="verif(this)">poules</span><span class="blue" onclick="verif(this)">du</span><span class="blue" onclick="verif(this)">couvent</span><span class="blue" onclick="verif(this)">couvent</span><span class="blue" onclick="verif(this)">l</span><span class="blue" onclick="verif(this)">obscurit�</span><span class="blue" onclick="verif(this)">la</span><span class="blue" onclick="verif(this)">nuit</span><span class="blue" onclick="verif(this)"> Pourquoi</span><span class="blue" onclick="verif(this)">moi</span><span class="blue" onclick="verif(this)">eux</span><span class="blue" onclick="verif(this)">m�mes</span><span class="blue" onclick="verif(this)"> radis</span><span class="blue" onclick="verif(this)">noirs</span><span class="blue" onclick="verif(this)">s�rieux</span> where all the ponctuation disappears! any idea please thanks
|
Pages: 1 Prev: Visual Basic Setup Problems Next: Pset method in VB.net |