'Populate `self.fields_to_progs` for a given field.
Do some sanity checks then compile the regexes.'

def _set_pattern(self, field):

    if (field not in MediaFile.fields()):
        self._log.error(u'invalid    field:    {0}', field)
    elif (field in ('id', 'path', 'album_id')):
        self._log.warning(u"field    '{0}'    ignored,    zeroing    it    would    be    dangerous", field)
    else:
        try:
            for pattern in self.config[field].as_str_seq():
                prog = re.compile(pattern, re.IGNORECASE)
                self.fields_to_progs.setdefault(field, []).append(prog)
        except confit.NotFoundError:
            self.fields_to_progs[field] = []
