updated getFormats regex to handle unknown & ?x formats