in reply to Extracting up to a certain string

Would you mind posting some sample code and/or data? It would be a lot easier to help if we had something to work with. In particular, this sounds like a problem waiting for a regex solution, but I can't design a regex without seeing the data. :)

-fp