# match

relationalai.semantics.std.re

```python
match(regex: StringValue, value: StringValue) -> RegexMatch
```

Check if the regex matches the value from the start.

## Parameters

- `regex` (`StringValue`) - The regular expression pattern.
- `value` (`StringValue`) - The string value to match against.

## Returns

- [`RegexMatch`](/api/python/v2.3/semantics/std/re/regexmatch_class/index.md) - A `RegexMatch` object representing the match result.

## Examples

Match a pattern from the start of a string:

```python
define(Person.new(name="Alice"), Person.new(name="bob"))
re.match(r"S.*", Person.name)
select(Person.name).where(re.match(r"[A-Z]", Person.name))
```
