i need help with the following input :
abcd diff
random data(any number of lines)
efgh diff
random data(any number of lines)
What I exactly need to do is when regex finds diff,I need to start printing from the next N line till it reaches the next diff.So basically I am trying to open a file from the position where regex is matched and then somehow get to print whatever is in the next lines. Could you please help me do this.