pass captured regex matches to handler functions