Let there be a sample text in a RichTextBox :
Q What is your name?
A My Name is William.
Q Do you know why we are here today?
A Yes I do.
Q Why is that?
A We are here because my dog bite Samuel Gordon.
Q How long ago did this happen?
A Approximately 14 months ago.
Q Where did this happen?
A In my backyard.
Q What is your address?
A 18 Court Place, Jordon’s house.
Q Was Mr. Gordon a guest of yours?
Q Why was he in your backyard?
A That is a mighty fine question.
Q Why do you think he was there?
A It appeared to me that he planned to rob me.
Q You personally?
A No, my home…
Now I have to perform a a backward search one for Question Set and another for Answer set.
The Question set starts with "Q " and the answer set starts with "A ".
I can easily search backward with
But as I have to perform the same thing for two different set of lines in one RichTextBox, I have a little confusion.
The SearchQ button will perform backward search for the lines start with "Q " in the whole RichTextBox
The SearchA button will perform backward search for the lines start with "A " in the whole RichTextBox
Can anyone help me?