Function
regexp_extract
(a: Datum, r: &AnalyzedRegex)
Source from the content-addressed store, hash-verified
| 2958 | } |
| 2959 | |
| 2960 | fn 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 | |
| 2971 | fn regexp_matches<'a>( |
| 2972 | exprs: &[Datum<'a>], |
Tested by
no test coverage detected