add capture names to returned matches