matches and groups both output