MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / translate_pattern

Function translate_pattern

Lib/distutils/filelist.py:312–343  ·  view source on GitHub ↗

Translate a shell-like wildcard pattern to a compiled regular expression. Return the compiled regex. If 'is_regex' true, then 'pattern' is directly compiled to a regex (if it's a string) or just returned as-is (assumes it's a regex object).

(pattern, anchor=1, prefix=None, is_regex=0)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

include_patternMethod · 0.85
exclude_patternMethod · 0.85

Calls 3

glob_to_reFunction · 0.85
compileMethod · 0.45
joinMethod · 0.45

Tested by 1