def _ReplaceRegExPart(self, part):
    if (part == '**/'):
        return '(?:.*\\/)?'
    elif (part == '*'):
        return '[^\\/]*'
    elif (part == '?'):
        return '[^\\/]'
    elif GROUPING_PATTERN.match(part):
        return GROUPING_PATTERN.sub(self._ReplaceRegExGrouping, part)
    else:
        return re.escape(part)
def _ReplaceRegExPart(self, part):
    if (part == '**/'):
        return '(?:.*\\/)?'
    elif (part == '*'):
        return '[^\\/]*'
    elif (part == '?'):
        return '[^\\/]'
    elif GROUPING_PATTERN.match(part):
        return GROUPING_PATTERN.sub(self._ReplaceRegExGrouping, part)
    else:
        return re.escape(part)