K
kadau
Hi 
I hope this is an appropriate group to post in, my apologies if it is
not. I would to to be able to read from a file and be able to locate all
the instances of a substring within it, save it in an array, then print
it out. I am fine with this except finding all the matches. Could anyone
explain how to do this with index? Or is there some other way (please
try to keep it simple if you can
Here is the text file ive been given
__
#Transaction code
S,M,L
#Sales commission
5:7:10
#Retail price items
*1<1002.00<
*2<125.00<
*3<61864.35<
*4<890876.99<
*5<9.99<
__
I want to locate & save to an array all lines begging with "*". I
presume I will then be able to use split to get the raw prices out of
the array (in between the "<").
Thanks to anyone who can help.
I hope this is an appropriate group to post in, my apologies if it is
not. I would to to be able to read from a file and be able to locate all
the instances of a substring within it, save it in an array, then print
it out. I am fine with this except finding all the matches. Could anyone
explain how to do this with index? Or is there some other way (please
try to keep it simple if you can
Here is the text file ive been given
__
#Transaction code
S,M,L
#Sales commission
5:7:10
#Retail price items
*1<1002.00<
*2<125.00<
*3<61864.35<
*4<890876.99<
*5<9.99<
__
I want to locate & save to an array all lines begging with "*". I
presume I will then be able to use split to get the raw prices out of
the array (in between the "<").
Thanks to anyone who can help.