guess_formats: match flex regexp first (fix #229)