MCPcopy Index your code
hub / github.com/nodejs/node / Pattern

Class Pattern

tools/test.py:1521–1534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1519
1520
1521class Pattern(object):
1522
1523 def __init__(self, pattern):
1524 self.pattern = pattern
1525 self.compiled = None
1526
1527 def match(self, str):
1528 if not self.compiled:
1529 pattern = "^" + self.pattern.replace('*', '.*') + "$"
1530 self.compiled = re.compile(pattern)
1531 return self.compiled.match(str)
1532
1533 def __str__(self):
1534 return self.pattern
1535
1536
1537def SplitPath(path_arg):

Callers 1

SplitPathFunction · 0.70

Calls

no outgoing calls

Tested by 1

SplitPathFunction · 0.56