@staticmethod<EOL><INDENT>def replace_wildcards(string, wildcard, regex):<DEDENT>
replaced = False<EOL>match = wildcard.search(string)<EOL>if match:<EOL><INDENT>string = wildcard.sub(regex, string)<EOL>logging.getLogger('<STR_LIT>').debug('<STR_LIT>'.format(pattern=string))<EOL>replaced = True<EOL><DEDENT>return string, replaced<EOL>
Replace wildcard symbols with regular expressions
:param wildcard:
:type  wildcard: _sre.SRE_Pattern

:param regex:
:type  regex: str

:rtype: tuple of (str, bool)