0 Replies - 219 Views - Last Post: 07 February 2013 - 08:23 PM Rate Topic: -----

#1 tonzkillera  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 29-March 12

Find Text and Replace in RichTextBox

Posted 07 February 2013 - 08:23 PM

First of all : Sorry for Bad English

Greeting to all masters;

My problem is:

* A Few days of head BOOM!..
I want to sort the remaining text to Links Text's only.

{
Example:

http://www.towinginl...om/rate-us.html get towing highlands ranch

{ REMAINING TEXT's }

Output:

http://www.towinginl...om/rate-us.html
}

* The output is only gathered all links and delete all remaining text's.
Because it contains many links :(/>

Dim str(10) As String
        str(1) = "https://"
        str(2) = "https://"
        str(3) = "https://"
        str(4) = "https://"
        str(5) = "https://"
        str(6) = "https://"
        str(7) = "https://"
        str(8) = "https://"
        str(9) = "https://"
        str(10) = "https://"

        For index As Integer = 1 To 10
            Dim start As Integer = RichTextBox1.Text.IndexOf("https:" & index.ToString & " 	")
            If start <> -1 Then
                RichTextBox1.Selectionstart = start
                RichTextBox1.SelectionLength = 2 + index.ToString.Length
                RichTextBox1.SelectedText = str(index)
            End If
        Next
    End Sub


I know my codes is strange and please understand me because I am new in VB.net.. Please help masters

Is This A Good Question/Topic? 0
  • +

Page 1 of 1