Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Find Text and Replace in RichTextBox

$
0
0
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.towinginlakewoodco.com/rate-us.html get towing highlands ranch

{ REMAINING TEXT's }

Output:

http://www.towinginlakewoodco.com/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

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>