Thanks for the tip. I should have also mentioned in my post that the
input file is huge (of the order of 10GBs or so) and the indices i,j
which I am be looking for are usually a million apart.
So I can
preprocess the fileand concatenate the strings etc. - but I was hoping
that I could just include a "\n" into my expression and it will take
care of the matching - even on my original input file. That would be
much easier.
ddrudik - Thanks for your kind help anyway.