MCPcopy Create free account
hub / github.com/StackStorm/st2 / match_regex

Function match_regex

st2common/st2common/operators.py:267–275  ·  view source on GitHub ↗
(value, criteria_pattern)

Source from the content-addressed store, hash-verified

265
266
267def match_regex(value, criteria_pattern):
268 # match_regex is deprecated, please use 'regex' and 'iregex'
269 if criteria_pattern is None:
270 return False
271
272 value, criteria_pattern = ensure_operators_are_strings(value, criteria_pattern)
273 regex = re.compile(criteria_pattern, re.DOTALL)
274 # check for a match and not for details of the match.
275 return regex.match(value) is not None
276
277
278def regex(value, criteria_pattern):

Callers

nothing calls this directly

Calls 2

matchMethod · 0.45

Tested by

no test coverage detected