Text & patterns
Scalar
regexp_replace()
If string contains the regexp pattern, replaces the matching part with replacement. A set of optional options can be set.
Arguments & returns
2 overloadsregexp_replace(string, pattern, replacement[)
Scalar
| Overload link | string | pattern | replacement[ |
Returns |
|---|---|---|---|---|
| #01 | VARCHAR | VARCHAR | VARCHAR |
VARCHAR |
regexp_replace(string, pattern, replacement[, options])
Scalar
| Overload link | string | pattern | replacement[ | options] |
Returns |
|---|---|---|---|---|---|
| #02 | VARCHAR | VARCHAR | VARCHAR | VARCHAR |
VARCHAR |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
In a query
Turn a label into a useful key.
Trim the edges, normalize case, and replace runs of spaces. Small functions compose into a readable cleaning step.
Haybarn WASM 1.5.5-rc3 · In your browser
Guide recipe · Run to view results.
In other engines
Exasolregexp_replace()
REGEXP_REPLACE(subject, pattern, replacement, position, occurrence)
REGEXP_REPLACE(subject, pattern, replacement)
Snowflakeregexp_replace()
REGEXP_REPLACE(subject, pattern)
REGEXP_REPLACE(subject, pattern, '', 'g')