* match(haystack, pattern) - search by regular expression re2; Returns 0 or 1.
* multiMatchAny(haystack, [pattern_1, pattern_2, ..., pattern_n]) -- search by re2 regular expressions pattern_i; Returns 0 or 1 if any pattern_i matches.
* multiMatchAnyIndex(haystack, [pattern_1, pattern_2, ..., pattern_n]) -- search by re2 regular expressions pattern_i; Returns index of any match or zero if none;
* multiMatchAllIndices(haystack, [pattern_1, pattern_2, ..., pattern_n]) -- search by re2 regular expressions pattern_i; Returns an array of matched indices in any order;
*
* Applies regexp re2 and pulls:
* - the first subpattern, if the regexp has a subpattern;
select5=multiMatchAnyIndex(materialize('vladizlvav dabe don\'t heart me no more'),['what','is','love','baby','no mo??','dont','h.rt me'])fromsystem.numberslimit10;;
select5=multiMatchAnyIndex(materialize('vladizlvav dabe don\'t heart me no more'),['what','is','love','baby','no mo??','dont','h.rt me'])fromsystem.numberslimit10;
select2=multiFuzzyMatchAnyIndex('halo some wrld',2,['^hello.*world$','^halo.*world$']);
select1=multiFuzzyMatchAnyIndex('halo some wrld',2,['^halo.*world$','^hello.*world$']);
select[2,3,4]=arraySort(multiFuzzyMatchAllIndices('halo some wrld',2,['some random string','^halo.*world$','^halo.*world$','^halo.*world$','^hallllo.*world$']));
select[]=multiFuzzyMatchAllIndices('halo some wrld',2,['^halllllo.*world$','some random string']);
The same as `multiMatchAny`, but returns 1 if any pattern matches the haystack within a constant [edit distance](https://en.wikipedia.org/wiki/Edit_distance). This function is also in an experimental mode and can be extremely slow. For more information see [hyperscan documentation](https://intel.github.io/hyperscan/dev-reference/compilation.html#approximate-matching).
...
...
@@ -72,6 +76,10 @@ The same as `multiMatchAny`, but returns 1 if any pattern matches the haystack w
The same as `multiFuzzyMatchAny`, but returns any index that matches the haystack within a constant edit distance.
То же, что и `multiMatchAny`, но возвращает 1 если любой pattern соответствует haystack в пределах константного [редакционного расстояния](https://en.wikipedia.org/wiki/Edit_distance). Эта функция также находится в экспериментальном режиме и может быть очень медленной. За подробностями обращайтесь к [документации hyperscan](https://intel.github.io/hyperscan/dev-reference/compilation.html#approximate-matching).
...
...
@@ -65,6 +69,10 @@
То же, что и `multiFuzzyMatchAny`, только возвращает любой индекс подходящего регулярного выражения в пределах константного редакционного расстояния.
То же, что и `multiFuzzyMatchAny`, только возвращает массив всех индексов всех подходящих регулярных выражений в любом порядке в пределах константного редакционного расстояния.
!!! note "Примечание"
`multiFuzzyMatch*` функции не поддерживают UTF-8 закодированные регулярные выражения, и такие выражения рассматриваются как байтовые из-за ограничения hyperscan.