blob: 5e6b330fca9232f1869a68f790ac2ff50bc426c7 [file] [log] [blame] [view]
---
{
"title": "MULTI_MATCH_ANY",
"language": "en",
"description": "Checks whether the string haystack matches the regular expressions patterns in re2 syntax."
}
---
## multi_match_any
### Description
#### Syntax
`TINYINT multi_match_any(VARCHAR haystack, ARRAY<VARCHAR> patterns)`
Checks whether the string `haystack` matches the regular expressions `patterns` in re2 syntax. returns 0 if none of the regular expressions are matched and 1 if any of the patterns matches.
### example
```
mysql> select multi_match_any('Hello, World!', ['hello', '!', 'world']);
+-----------------------------------------------------------+
| multi_match_any('Hello, World!', ['hello', '!', 'world']) |
+-----------------------------------------------------------+
| 1 |
+-----------------------------------------------------------+
mysql> select multi_match_any('abc', ['A', 'bcd']);
+--------------------------------------+
| multi_match_any('abc', ['A', 'bcd']) |
+--------------------------------------+
| 0 |
+--------------------------------------+
```
### keywords
MULTI_MATCH,MATCH,ANY