Click here to Skip to main content
11,933,854 members (56,358 online)
Rate this:
Please Sign up or sign in to 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 Smile | :)
Posted 28-Mar-13 17:57pm
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100