//System.out.println("Matched "+m.start()+"-"+m.end());
Match mtch = new Match(m.start(), m.end(), this);
if (bindings!=null) {
int gc = Math.min(m.groupCount(), bindings.length);
for (int i=1; i<=gc; i++) {
mtch.bind(bindings[i-1], m.group(i));
}
} else if (m.groupCount()>0) { // no explicit bindings; save group 1
mtch.bind(null,m.group(1));
}
alm.add(mtch);