## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> REGEXP_REPLACE[REGEXP_REPLACE]:::quoted REGEXP_REPLACE --> End((END)) ``` ## Purpose The `REGEXP_REPLACE` SQL function replaces all occurrences matching the regular expression with the replacement value. The replacement value may contain references to matches in the regular expression by using the dollar-sign (') plus the reference number. The regular expression must follow the Microsoft.net regular expression language. Parameters: - Input: The text to get the substring from. - Pattern: Regular expression pattern. - Replacement [optional]: Text to replace with. - Start position [optional]: The start index from the input. - Appearance [optional]: Indicating the appearance of the replace operation (use '0' for all appearances). - Match_parameter [optional]: A text literal that lets you change the default matching behavior of the function. The available options are 'c' for case-sensitive, 'i' for ignore case, 'n' for single-line, 'm' for multi-line and 'x' for ignore pattern white space. Returns: the input with every occurrence of the regular expression pattern replaced with the replacement.