pub fn regex_replace<S, P, R, SP, O>(
source: impl IntoExpr<S>,
pattern: impl IntoExpr<P>,
replacement: impl IntoExpr<R>,
flags: RegexReplaceFlags,
) -> Expr<O>Expand description
Replaces the first POSIX regular-expression match in source, or returns source unchanged when none exists.
RegexReplaceFlags::GLOBAL replaces every match; RegexReplaceFlags::CASE_INSENSITIVE ignores case.
replacement supports PostgreSQL backreferences (\1 through \9, \&, and \\ for a literal backslash).
Returns NULL if source, pattern, or replacement is NULL.
Maps to PostgreSQL REGEXP_REPLACE.