Handle special characters in part conditions