Skip to content

fullmatch

relationalai.semantics.std.re
fullmatch(
regex: StringValue, value: StringValue, pos: IntegerValue = 0
) -> RegexMatch

Check if the regex matches the entire value starting at the given position.

  • regex

    (StringValue) - The regular expression pattern.
  • value

    (StringValue) - The string value to match against.
  • pos

    (IntegerValue, default: 0) - The starting position for the match (0-based). Default: 0.
  • RegexMatch - A RegexMatch object representing the match result.

Match entire string against a pattern:

>>> re.fullmatch(r"[A-Z][a-z]+", Person.name)
>>> select(Email.address).where(re.fullmatch(r"\w+@\w+\.\w+", Email.address))