Find Text String and Output Line Numbers Text Falls on

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 18
Reputation: mjsmikey is an unknown quantity at this point 
Solved Threads: 0
mjsmikey mjsmikey is offline Offline
Newbie Poster

Find Text String and Output Line Numbers Text Falls on

 
0
  #1
Jan 16th, 2009
How do I find a Known String of Text "M6" from a Loaded Text Document that is in RichTextBox1, then get it to output the Lines that these strings (all of them) are found to a ListBox. Notepad can do this is Less then one second, with CTRL-F and NEXT NEXT NEXT feature, but It doesn't actually save the lines, what is the code for that? DreamWeaver will do this in Less then a Second also when you use the CTRL-F, and it tells the line and column where the sting is present.

My current code (No need to post it...) takes about 1 hour to find all the text in a 15,000 line document because it searches line by line for the string and the iterations of the sting start over at 1 and loads up the buffer at read.

Please be very descriptive as I'm not the most advanced coder I only make small programs for simple tasks and only very rarely.

Thanks,

Mike
Last edited by mjsmikey; Jan 16th, 2009 at 11:36 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 276
Reputation: rapture has a spectacular aura about rapture has a spectacular aura about 
Solved Threads: 37
rapture rapture is offline Offline
Posting Whiz in Training

Re: Find Text String and Output Line Numbers Text Falls on

 
0
  #2
Jan 16th, 2009
Is this similar to what you want to do?

http://www.hunterstone.com/library/RichTextBoxHS.htm
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC