---
title: MATCH
url: https://www.tines.com/docs/formulas/functions/match/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# MATCH

*[View on tines.com](https://www.tines.com/docs/formulas/functions/match/)*

Returns true if text contains the regex expression regex_to_match and false otherwise. Optionally, include a string containing [Ruby modifiers](https://docs.ruby-lang.org/en/master/Regexp.html#class-Regexp-label-Modes) – e.g. `i` for case insensitive mode.

**Categories:** Text

## Syntax

```
MATCH(text, regex_to_match,  [modifiers])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": "The quick brown fox jumps over the lazy dog. It barked."
  }
}
```

Formula:

```
MATCH(my_action.message, "[A-Z]")
```

Output:

```json
true
```

### Example 2

Input:

```json
{
  "my_action": {
    "message": "the quick brown fox jumps over the lazy dog. it barked."
  }
}
```

Formula:

```
MATCH(my_action.message, "[A-Z]")
```

Output:

```json
false
```

### Example 3

Input:

```json
{
  "my_action": {
    "message": "the quick brown fox jumps over the lazy dog. it barked."
  }
}
```

Formula:

```
MATCH(my_action.message, "[A-Z]", "i")
```

Output:

```json
true
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "1",
  "agents": [
    {
      "disabled": false,
      "name": "MATCH",
      "description": "It's searching a string for something that begins with a capital or lower case 'A' and ends with 's' (in this example \"Apples\" matches).",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "Match": "=MATCH(my_action.string, '[Aa].+s')"
        }
      },
      "position": {
        "x": -6645,
        "y": -1215
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "string": "Apples are the best fruit"
        }
      },
      "position": {
        "x": -6645,
        "y": -1305
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 1,
      "receiverIdentifier": 0
    }
  ],
  "diagramNotes": []
}
```
