Reducing template data within regex method