MCPcopy Index your code
hub / github.com/python/cpython / prefixmatch

Function prefixmatch

Lib/re/__init__.py:163–166  ·  view source on GitHub ↗

Try to apply the pattern at the start of the string, returning a Match object, or None if no match was found.

(pattern, string, flags=0)

Source from the content-addressed store, hash-verified

161# public interface
162
163def prefixmatch(pattern, string, flags=0):
164 """Try to apply the pattern at the start of the string, returning
165 a Match object, or None if no match was found."""
166 return _compile(pattern, flags).prefixmatch(string)
167
168# Our original name which was less explicitly clear about the behavior for prefixmatch.
169match = prefixmatch

Callers

nothing calls this directly

Calls 1

_compileFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…