MCPcopy Create free account
hub / github.com/davidblewett/rure-python / is_match

Method is_match

rure/lib.py:121–133  ·  view source on GitHub ↗

Returns true if and only if the regex matches the string given. It is recommended to use this method if all you need to do is test a match, since the underlying matching engine may be able to do less work.

(self, haystack, start=0)

Source from the content-addressed store, hash-verified

119
120 @accepts_bytes
121 def is_match(self, haystack, start=0):
122 """ Returns true if and only if the regex matches the string given.
123
124 It is recommended to use this method if all you need to do is test
125 a match, since the underlying matching engine may be able to do less
126 work.
127 """
128 return bool(_native.lib.rure_is_match(
129 self._ptr,
130 haystack,
131 len(haystack),
132 start
133 ))
134
135 @accepts_bytes
136 def find(self, haystack, start=0):

Callers 3

test_is_matchMethod · 0.95
test_flagsMethod · 0.95
is_matchFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_is_matchMethod · 0.76
test_flagsMethod · 0.76