regex_match
relationalai.semantics.std.strings
regex_match(value: StringValue, regex: StringValue) -> ExpressionCheck if the value matches the given regex.
Parameters
Section titled “Parameters”
(valueStringValue) - The string value to match against.
(regexStringValue) - The regular expression pattern.
Returns
Section titled “Returns”Expression- AnExpressionthat evaluates totrueifvaluematches theregexpattern.
Examples
Section titled “Examples”Match strings using regular expressions:
>>> select(Person.name).where(strings.regex_match(Person.name, r".*ohn.*"))>>> select(Person.name).where(not_(strings.regex_match("ohn", Person.name)))