1 Replies - 482 Views - Last Post: 27 January 2009 - 09:41 AM Rate Topic: -----

#1 ciufflegend  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-January 09

Find a string

Post icon  Posted 27 January 2009 - 09:24 AM

I need a sub that can find a string in a rich textbox...
I can find a string with the function .find but i need to focus the other string with that name...
EX: Hi lol hi hi

i need to find the first hi, but if i want i need to find the second hi, but i don't know how i can do it....
[sry 4 my english]
Is This A Good Question/Topic? 0
  • +

Replies To: Find a string

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 764
  • View blog
  • Posts: 5,095
  • Joined: 08-December 08

Re: Find a string

Posted 27 January 2009 - 09:41 AM

You will need to parse through the string in the RichTextBox and store the position of the found word in a variable. When you start the next search you will have to start it from the position, next to the one of the previously found word.

Dream.In.Code forum rules state that you should show some effort in solving your problem. Please, post the code you've been working so far. Post the code between code tags: :code:

Thank you!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1