REGEXP_REPLACE
regular expression evaluation
What changes
- Input
- string, regex pattern, flags
- Output or change
- match result, position, count or replaced text
- Return type
- Expression.
Syntax at a glance
REGEXP_REPLACE ( string_expression, pattern_expression [ , string_replacement [ , start [ , occurrence [ , flags ] ] ] ] )
Work example
Replace text that matches a regular expression during a controlled cleanup query.
Preview source and result side by side and keep the replacement rule narrow.
Check your work A broad pattern can remove meaningful text even when the result remains valid SQL string data.
Open Microsoft Learn for full syntax, permissions, and details for your version.