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

Method is_match

rure/lib.py:293–307  ·  view source on GitHub ↗

Returns true if and only if one of the regexs 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

291
292 @accepts_bytes
293 def is_match(self, haystack, start=0):
294 """
295 Returns true if and only if one of the regexs matches the string
296 given.
297
298 It is recommended to use this method if all you need to do is test
299 a match, since the underlying matching engine may be able to do less
300 work.
301 """
302 return bool(_native.lib.rure_set_is_match(
303 self._ptr,
304 haystack,
305 len(haystack),
306 start
307 ))
308
309 @accepts_bytes
310 def matches(self, haystack, start=0):

Callers 2

test_is_matchMethod · 0.95
test_flagsMethod · 0.95

Calls

no outgoing calls

Tested by 2

test_is_matchMethod · 0.76
test_flagsMethod · 0.76