Click here to Skip to main content
15,608,989 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
For j As Integer = 0 To RichTextBox1.Lines.Length - 1

           Dim lines() As String = Me.RichTextBox1.Lines
           RichTextBox1.SelectedText = lines(j).IndexOf("http")
           RichTextBox1.SelectionLength = (30)

           RichTextBox2.Text = RichTextBox1.SelectedText.ToString


i want to copy all lines in richtextbox1 contain word "http", i follow this code but it showing different error.
can anyone suggest other code or help in this code :)
Sergey Alexandrovich Kryukov 28-Mar-13 23:27pm    
"Different error..." is not informative.
important17 28-Mar-13 23:33pm    
firstly it was showing "-1 out of bourdaries"
now it showing "Index was outside the bounds of the array."
Sergey Alexandrovich Kryukov 28-Mar-13 23:37pm    
Do I have to pull every detail from you? In what line...
Sergey Alexandrovich Kryukov 28-Mar-13 23:38pm    
Look, such programming cannot work anyway (I don't say your code, programming in general). What is the world constant 30? No way...
sariqkhan 29-Mar-13 1:06am    
sir can you help me here please if you can

1 solution

Check here there are many methods of find a text in richtextbox[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900