Skip to main content

regex_split

Function regex_split 

Source
pub fn regex_split<S, P, O>(
    source: impl IntoExpr<S>,
    pattern: impl IntoExpr<P>,
    flags: RegexSplitFlags,
) -> Expr<O>
where S: StringBinaryExpr<P, Vec<String>, Output = O>,
Expand description

Splits source around POSIX regular-expression matches into a text array. Returns source as the only element when no match exists. Zero-length matches at the start or end, or immediately after a previous match, are ignored. RegexSplitFlags::CASE_INSENSITIVE enables case-insensitive matching. Returns NULL if source or pattern is NULL. Maps to PostgreSQL REGEXP_SPLIT_TO_ARRAY.