Fix bug for regex