Hi,
I need to extract data from a text file in which data has a pattern. I need to extract all repeated pattern and then save it to different files.
example:
input is:
ST*867*000352214
BPT*00*1000352214*090311
SE*1*1
ST*867*000352215
BPT*00*1000352214*090311
SE*1*2
ST*867*000352216
BPT*00*1000352214*090311
SE*1*3
output is like:
first file:
ST*867*000352214
BPT*00*1000352214*090311
SE*1*1
second file:
ST*867*000352215
BPT*00*1000352214*090311
SE*1*2
Third File:
ST*867*000352216
BPT*00*1000352214*090311
SE*1*3
You see , output is splitted into three different files based on ST-SE segment repeated in the file.
Can anybody please help me to put me close to solution?
Thanks in advance.
Regards,
Neeraj