Regarding your update to the OP: please note that you can and should put "code" tags around data samples (and you can abbreviate them to <c> and </c>). Also, you can have two or more separate "code" blocks in one post, like this:
Sample data from one type of file:
gi|110123922|gb|EC817325.1|EC817325 gi|110095377|gb|EC788780.1|EC78878
+0
gi|110123921|gb|EC817324.1|EC817324 gi|110105430|gb|EC798833.1|EC79883
+3 6
gi|110123920|gb|EC817323.1|EC817323 gi|110106464|gb|EC799867.1|EC79986
+7
Sample data from another type of file:
gi|110104773|gb|EC798176.1|EC798176 gi|110119622|gb|EC813025.1|EC81302
+5
Now, could you please clarify: how many distinct types of input files are there? If more than one, how do you tell them apart? (Are the file names different in some regular way? Is there something different about their format or content?) What sort of matches are you looking for?
Now that I've previewed this reply of mine, so I can see your data samples in "code" font, I'm still stuck. You haven't really given a clear enough explanation of what you're trying to do.