added how to capture regex groups