- Overview
- Data types
- Commands
- Functions
- Overview
- Aggregate
- Conditional expression
- Conversion
- Date and time
- Numeric
- String
- Semi-structured data
- Window
- System
On this page
regexp_replace
Replaces text matched by a regular expression.
Syntax
regexp_replace( <expr>, regex => <regex>, replacement => <replacement> )
Arguments
<expr> is a string expression.
regex is a regular expression.
replacement is the replacement string.
Returns
Returns a string.
Examples
SELECT regexp_replace('status=500', regex => '[0-9]+', replacement => '200');