ArrayList<String> sectionData = new ArrayList<String>();
ArrayList<Match> sectionMatches = new ArrayList<Match>();
int pos = 0;
int lastHeaderStart = -1;
Match m;
while (null != (m = sectionHeaderPattern.match(data, pos)))
{
sectionMatches.add(m);
if (lastHeaderStart >= 0)
sectionData.add(data.substring(lastHeaderStart, m.getIndex()));
lastHeaderStart = m.getIndex();
pos = m.getIndex() + m.getValue().length();
}
if (lastHeaderStart >= 0)
sectionData.add(data.substring(lastHeaderStart));
sections_ = new ArrayList<Section>();