code: def get_link_pat (arg, strict=False):
      
      log.debug(LOG_CHECK, "Link pattern %r strict=%s", arg, strict)
      if arg.startswith('!'):
          pattern = arg[1:]
          negate = True
      else:
          pattern = arg
          negate = False
      try:
          regex = re.compile(pattern)
      except re.error as msg:
          log.warn(LOG_CHECK, "invalid regular expression %r: %s" % (pattern, msg))
          raise
      return {
          "pattern": regex,
          "negate": negate,
          "strict": strict,
      }
docs: Get a link pattern matcher for intern/extern links.
      Returns a compiled pattern and a negate and strict option.
  
      @param arg: pattern from config
      @type arg: string
      @param strict: if pattern is to be handled strict
      @type strict: bool
      @return: dictionary with keys 'pattern', 'negate' and 'strict'
      @rtype: dict
      @raises: re.error on invalid regular expressions