fix mimetype generated regex
return undefined if no format or no regex
use input-format-literal and input-format-regex on init