add capture name to returned matches

Line is a bit long, IMHO.