Hi friends,
I need an algorithm for the below concept. Where ever we find the "D" in the below (bold letter) we need to capture the image id (ARV001) again we need to find the last "C" (see the bold letter) (make sure this is the last "C" before of the next "D") here we need to capture the image id (see the bold).
Then the same concept we need to do upto complete this task.
input is in text file (notepad). Below is the input.
IM,ARV001,
D ,0,@arv;ARV\image\00;ARV001.tif;2
IM,ARV002, ,0,@arv;ARV\image\00;ARV002.tif;2
IM,ARV003,C,0,@arv;ARV\image\00;ARV003.tif;2
IM,ARV004,C,0,@arv;ARV\image\00;ARV004.tif;2
IM,ARV005, ,0,@arv;ARV\image\00;ARV005.tif;2
IM,ARV006, ,0,@arv;ARV\image\00;ARV006.tif;2
IM,ARV007,
C ,0,@arv;ARV\image\00;ARV007.tif;2
IM,
ARV008 , ,0,@arv;ARV\image\00;ARV008.tif;2
IM,ARV009,D,0,@arv;ARV\image\00;ARV009.tif;2
IM,ARV010, ,0,@arv;ARV\image\00;ARV010.tif;2
IM,ARV011, ,0,@arv;ARV\image\00;ARV021.tif;2
IM,ARV012,C,0,@arv;ARV\image\00;ARV012.tif;2
output (need)
ARV001 ARV008
ARV009 ARV012
Could you please help me how to write the algorithm or C# coding.