code: def patterns(self):
          if not self.args.patterns and not self.args.pattern_files:
              try:
                  self.args.patterns.append(self.args.files.pop(0))
              except IndexError:
                  raise LogRaptorArgumentError('PATTERN', 'no search pattern')
          patterns = set()
          if self.args.pattern_files:
              patterns.update([p.rstrip('\n') for p in fileinput.input(self.args.pattern_files)])
          patterns.update(self.args.patterns)
          logger.debug("search patterns to be processed: %r", patterns)
          if '' in patterns:
              logger.info("an empty pattern provided: match all strings!")
              return tuple()
          try:
              flags = re.IGNORECASE if self.args.case else 0 | re.UNICODE
              return tuple([
                  re.compile(r'(\b%s\b)' % pat if self.args.word else '(%s)' % pat, flags=flags)
                  for pat in patterns if pat
              ])
          except re.error as err:
              raise LogRaptorArgumentError('wrong regex syntax for pattern: %r' % err)