## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> REGEXP_SUBSTR[REGEXP_SUBSTR]:::quoted
REGEXP_SUBSTR --> End((END))
```
## Purpose
The `REGEXP_SUBSTR` SQL function extracts a substring from the given value using regular expression. The regular expression must follow the Microsoft.net regular expression language.
Parameters:
- Input: the text to get the substring from.
- Pattern: regular expression pattern.
- Start position [optional]: the start index from the input.
- Appearance [optional]: indicating the appearance of the substr operation.
- Match_parameter [optional]: a text literal that lets you change the default matching behavior of the function.
Returns: the substring from the input.