code: def replace_wildcards(string, wildcard, regex):
          
          replaced = False
          match = wildcard.search(string)
  
          if match:
              string = wildcard.sub(regex, string)
              logging.getLogger('agentml.trigger').debug('Parsing Pattern wildcards: {pattern}'.format(pattern=string))
              replaced = True
  
          return string, replaced
docs: Replace wildcard symbols with regular expressions
          :param wildcard:
          :type  wildcard: _sre.SRE_Pattern
  
          :param regex:
          :type  regex: str
  
          :rtype: tuple of (str, bool)