code: def get_regex(self):
          ''' Generates and returns compound regular expression '''
          regex = ''
          for flag in self.compound:
              if flag == '?' or flag == '*':
                  regex += flag
              else:
                  regex += '(' + '|'.join(self.flags[flag]) + ')'
  
          return regef get_regex(self):
          ''' Generates and returns compound regular expression '''
          regex = ''
          for flag in self.compound:
              if flag == '?' or flag == '*':
                  regex += flag
              else:
                  regex += '(' + '|'.join(self.flags[flag]) + ')'
  
          return regex
docs: Generates and returns compound regular expression