Rh}ddlZdZdZdZy)NcRdjttt|S)z Given a glob pattern, produce a regex that matches it. >>> translate('*.txt') '[^/]*\\.txt' >>> translate('a?txt') 'a.txt' >>> translate('**/*') '.*/[^/]*' )joinmapreplaceseparatepatterns )/usr/lib/python3.12/zipfile/_path/glob.py translater s 773w 12 33c.tjd|S)z Separate out character sets to avoid translating their contents. >>> [m.group(0) for m in separate('*.txt')] ['*.txt'] >>> [m.group(0) for m in separate('a[?]txt')] ['a', '[?]', 'txt'] z+([^\[]+)|(?P[\[].*?[\]])|([\[][^\]]*$))refinditerr s r rrs ;;Ew OOr c|jdxsTtj|jdjddjddjddS) zE Perform the replacements for a match from :func:`separate`. setrz\*\*z.*z\*z[^/]*z\?.)grouprescaper)matchs r rrsR ;;u   %++a.! 5 !  !   r )rr rrr r rs  4 P r