Thank you so much for reading my question. I have apart of a text file with a structure as following:
ADD=15470 RD=0,1 UZ=-4500,-4500
ADD=15471 RD=0,1 UZ=-4500,-4500
ADD=15472 RD=0,1 UZ=-4500,-4500
My target is
1) locate the lines with "LOAD", "NAME= LIVE","NAME=SIDL" and "NAME=CLADDING". In other words, how to get their line number?
2) use obtained line numbers to define sevearl search regions by using While loop and then take other actions. For example, perform re.sub between the line starting with "NAME=SIDL" and the line starting with "NAME=CLADDING".
Could you please show me how to achieve Step1. Thank you so much.