Monks,
I would like to write a program that reads a file finds a number code with a string and takes three previous lines and last line out. Is anybody familiar with HL7 adt messages? The file is an HL7 adt message. It contains specific header string formats like MSH,EVN,PID,FT1, PV1. The code that I need to find is located in FT1. So once I find it, I will need to move out the block that contains this code. for Instance if 123456 is found in FT1 , then I need to remove its MSH, EVN, PID, FT1 & PV1. All these are string lines. I'm looking for suggestions on how to accomplish this task???
Thanks in advance