you could capture the alternations to different groups in important_re rather than re-matching here