Link to home
Start Free TrialLog in
Avatar of blackbookcoder2
blackbookcoder2

asked on

vb6 select a string within a string using two arrays and copy the selection to the third array

vb6 select a string within a string using two arrays and copy the selection to the third array.
This question has two parts, 500 pts will be awarded to whomever answers both parts

I have two arrays:

Dim arrA(0) as string
Dim arrB(0) as string
Dim arrC(0) as string
Dim arrD(0) as string

arrA(0)  = "This is a test for me to find the answer?Please select the correct one."
arrB(0) = "find the answer?"
arrC(0) = ""
arrD(0) = ""

Part 1
how can I select the wording in arrB(0) out of arrA(0) and copy the selection to arrC(0)?


Part 2
How can I copy the question mark, character of the string "?", to a fourth array?
 
Thanks in advance.
SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of blackbookcoder2
blackbookcoder2

ASKER

excuse me for the unclear question.  I want to know if ArrB(0) contents are found anywhere is ArrA(0) and if it is found in ArrA(0) copy the content fragment of ArrA(0) to a new array.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"I want to know if ArrB(0) contents are found anywhere is ArrA(0)", how can i use mid to copy the string from ArrA(0) to another variable?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks both of you for your help, paulHews And IdleMind.  I know it was an unclear question, my apologies.  The mid solution is what I was looking for.  Copying arrC(0) = arrB(0) will only work one time in the programming I am working on.