fixed npe at regex matcher (a group can be null)