mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Update countMatchesCaseInsensitive function
This commit is contained in:
parent
dbc04c84dc
commit
c8f014591c
@ -1421,7 +1421,40 @@ Result:
|
||||
|
||||
## countMatchesCaseInsensitive
|
||||
|
||||
Like `countMatches(haystack, pattern)` but matching ignores the case.
|
||||
Like [`countMatches`](#countmatches) but matching ignores the case.
|
||||
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
countMatchesCaseInsensitive(haystack, pattern)
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
- `haystack` — The string to search in. [String](../../sql-reference/syntax.md#syntax-string-literal).
|
||||
- `pattern` — The regular expression with [re2 syntax](https://github.com/google/re2/wiki/Syntax). [String](../../sql-reference/data-types/string.md).
|
||||
|
||||
**Returned value**
|
||||
|
||||
- The number of matches.
|
||||
|
||||
Type: [UInt64](../../sql-reference/data-types/int-uint.md).
|
||||
|
||||
**Examples**
|
||||
|
||||
Query:
|
||||
|
||||
``` sql
|
||||
SELECT countMatchesCaseInsensitive('AAAA', 'aa');
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
``` text
|
||||
┌─countMatchesCaseInsensitive('AAAA', 'aa')────┐
|
||||
│ 2 │
|
||||
└──────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## regexpExtract
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user