<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_fields(self, classname=".*", fieldname=".*", fieldtype=".*", accessflags=".*"):
 """ find fields by regex :param classname: regular expression of the classname :param fieldname: regular expression of the fieldname :param fieldtype: regular expression of the fieldtype :param accessflags: regular expression of the access flags :rtype: generator of `FieldClassAnalysis` """

        for cname, c in self.classes.items():
            if re.match(classname, cname):
                for f in c.get_fields():
                    z = f.get_field()
                    if re.match(fieldname, z.get_name()) and \
                       re.match(fieldtype, z.get_descriptor()) and \
                       re.match(accessflags, z.get_access_flags_string()):
                        yield f