# Regex Match

> Check if a string matches a regular expression.

- ID: `regex_match`
- Type: Block
- Category: [Regex](https://inventor.bot/docs/reference/blocks/regex.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `regex` | yes | Regular expression to evaluate. | e.g. `"^hello"` |
| `text` | yes | Text to test against the regex. | e.g. `"hello world"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `match` | Whether the text matches the regex. | e.g. `"true"` |

**Example**

```go
regexMatch := regex_match(Args{regex: "^hello", text: "hello world"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Match: " + regexMatch.match,
})
```