I'm looking for a RegEx pattern which detects sections in the structured textfile below:
RecordHeader of Isotemplate 1
<Data>
FingerViewHeader IndexNr 0
<Data>
MinutiaIndex: 0
<Data>
MinutiaIndex: 1
<Data>
RecordHeader of Isotemplate 2
<Data>
FingerViewHeader IndexNr 0
<Data>
MinutiaIndex: 0
<Data>
MinutiaIndex: 1
<Data>
I need the whole multiline text from one RecordHeader to the next. There can be any number of FingerViews and Minutiae in between.
I tried (and of course many others..)
(RecordHeader)(.+\n)+(?=RecordHeader)
but this matches the whole file without stopping at the next RecordHeader (At least http://regexhero.net/tester/ did so).
Is this a good approach? It doesn't even need to be fast.