MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / checkRegexExpression

Function checkRegexExpression

src/Server/HTTPHandlerRequestFilter.cpp:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49};
50
51bool checkRegexExpression(std::string_view match_str, const CompiledRegexPtr & compiled_regex)
52{
53 int num_captures = compiled_regex->NumberOfCapturingGroups() + 1;
54
55 absl::InlinedVector<std::string_view, 5> matches(num_captures);
56 return compiled_regex->Match(
57 {match_str.data(), match_str.size()}, 0, match_str.size(), re2::RE2::Anchor::ANCHOR_BOTH, matches.data(), num_captures);
58}
59
60bool checkExpression(std::string_view match_str, const FilterExpression & expression)
61{

Callers 1

checkExpressionFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected