> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for REGEXP_LIKE_ANY function

# REGEXP_LIKE_ANY

Checks whether a given string matches any regular expression pattern from a specified list of patterns. Returns `FALSE` if it doesn't match, or `TRUE` if it matches.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
REGEXP_LIKE_ANY(<expression>, ['<pattern1>', '<pattern2>', ...])
```

## Parameters

| Parameter      | Description                                                                         | Supported input types                                                                                                        |
| :------------- | ----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- |
| `<expression>` | The input string or column to be evaluated against the regular expression patterns. | `TEXT`                                                                                                                       |
| `<pattern>`    | A list of regular expression patterns to match against the expression.              | ARRAY\[`TEXT`] where each element complies to the [RE2 regular expression](https://github.com/google/re2/wiki/Syntax) syntax |

## Return Type

`BOOLEAN`

## Examples

The following code example checks whether the string `123` matches either the `[a-z]` expression, which specifies any lowercase letter, or the `[1-9]+` expression, which specifies one or more digits:

<div className="query-window">
  ```
  SELECT REGEXP_LIKE_ANY('123', ['[a-z]', '[1-9]+']);
  ```

  | regexp\_like\_any <span>boolean</span> |
  | :------------------------------------- |
  | True                                   |

  <p><span>Rows: 1</span><span>Execution time: 5.37ms</span></p>
</div>

The following code example checks whether the string `!@#$%^&*()` matches either the `\d+` expression, which specifies one or more digits, or the `[a-z|A-Z]+` expression, which specifies one or more lowercase or uppercase characters:

<div className="query-window">
  ```
  SELECT REGEXP_LIKE_ANY('!@#$%^&*()', ['\d+', '[a-z|A-Z]+']);
  ```

  | regexp\_like\_any <span>boolean</span> |
  | :------------------------------------- |
  | False                                  |

  <p><span>Rows: 1</span><span>Execution time: 6.33ms</span></p>
</div>

The following code example checks if the string `a` matches either the `[1-9]+` expression, which specifies one or more digits, or a `NULL` value:

<div className="query-window">
  ```
  SELECT REGEXP_LIKE_ANY('a', ['[1-9]+', NULL]);
  ```

  | regexp\_like\_any <span>boolean null</span> |
  | :------------------------------------------ |
  | NULL                                        |

  <p><span>Rows: 1</span><span>Execution time: 5.06ms</span></p>
</div>

The following code example checks whether the string `123` matches either the `[1-9]+` expression or `NULL`. The function returns `TRUE` because the string matches the first regular expression. The `NULL` element does not affect the result as long as a match is found.

<div className="query-window">
  ```
  SELECT REGEXP_LIKE_ANY('123', ['[1-9]+', NULL]);
  ```

  | regexp\_like\_any <span>boolean null</span> |
  | :------------------------------------------ |
  | True                                        |

  <p><span>Rows: 1</span><span>Execution time: 6.09ms</span></p>
</div>
