match
relationalai.semantics.std.re
match(regex: StringValue, value: StringValue) -> RegexMatchCheck if the regex matches the value from the start.
Parameters
Section titled “Parameters”
(regexStringValue) - The regular expression pattern.
(valueStringValue) - The string value to match against.
Returns
Section titled “Returns”RegexMatch- ARegexMatchobject representing the match result.
Examples
Section titled “Examples”Match a pattern from the start of a string:
>>> re.match(r"S.*", Person.name)>>> select(Person.name).where(re.match(r"^[A-Z]", Person.name))Referenced By
Section titled “Referenced By”RelationalAI Documentation
└── Build With RelationalAI
└── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
└── Match text with patterns
└── Match prefixes with re.match