slight modification to how we generate the regex.