consume bug for regex