code: def exclude_match(exclude, link_value):
      
      if hasattr(exclude, "search") and exclude.search(link_value):
          return True
  
      if exclude == link_value:
          return True
  
      return False
docs: Check excluded value against the link's current value