Hello. study ClickHouse. I am interested in the syntax of regular expressions. For example, I need to find string that contain character '2' followed by '3' or '4'. Has tried: '\2[3-4]' not particularly helps. Maybe someone can help, thank you.
select x, match(x, '2[3-4]') as match from (select arrayJoin(['12345', '224', '125432']) x)
ββxβββββββ¬βmatchββ
β 12345 β 1 β
β 224 β 1 β
β 125432 β 0 β
ββββββββββ΄ββββββββ
We use re2 syntax that is a limited version of PCRE:
https://clickhouse.yandex/docs/en/query_language/functions/string_search_functions/#match-haystack-pattern
Most helpful comment