in reply to Tag protein names in sentences

Searching over and over is going to take forever! You would do better putting your time into computing a lookup table of the names, then breaking your sentences down into tokens (words) and checking for their existence in the lookup table. You could use either a hash, if you have the memory, or a database.

Have a look around, maybe time spent now will save you time in the long run, but if you are only doing this search the once, maybe just take the hit of long computation time, and get onto the next problem.

Sorry I can't be of more help, but I am going home!

Just a something something...