Replace wildcard symbols with regular expressions
        :param wildcard:
        :type  wildcard: _sre.SRE_Pattern

        :param regex:
        :type  regex: str

        :rtype: tuple of (str, bool)

def replace_wildcards(string, wildcard, regex):
        """
        Replace wildcard symbols with regular expressions
        :param wildcard:
        :type  wildcard: _sre.SRE_Pattern

        :param regex:
        :type  regex: str

        :rtype: tuple of (str, bool)
        """
        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