Match entities before number, so that \sim2 is fontified correctly