MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / regexp_extract

Function regexp_extract

src/expr/src/relation/func.rs:2960–2969  ·  view source on GitHub ↗
(a: Datum, r: &AnalyzedRegex)

Source from the content-addressed store, hash-verified

2958}
2959
2960fn regexp_extract(a: Datum, r: &AnalyzedRegex) -> Option<(Row, Diff)> {
2961 let r = r.inner();
2962 let a = a.unwrap_str();
2963 let captures = r.captures(a)?;
2964 let datums = captures
2965 .iter()
2966 .skip(1)
2967 .map(|m| Datum::from(m.map(|m| m.as_str())));
2968 Some((Row::pack(datums), Diff::ONE))
2969}
2970
2971fn regexp_matches<'a>(
2972 exprs: &[Datum<'a>],

Callers 1

evalMethod · 0.85

Calls 7

packFunction · 0.85
unwrap_strMethod · 0.80
innerMethod · 0.45
mapMethod · 0.45
skipMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected