REGEXPREPLACE Function
From Planfix
The REGEXPREPLACE function replaces all occurrences of a substring that match a regular expression with a specified value. This is useful for cleaning data, replacing or extracting information in text strings.
Format
- REGEXPREPLACE("text"; "regular expression"; "replacement")
Arguments:
- text (required) — the string in which replacements will be performed.
- regular expression (required) — the regular expression used to find matches in the string.
- replacement (required) — the text that will replace matches of the regular expression.
Example
| Formula | Description | Result |
|---|---|---|
| REGEXPREPLACE("+1(212)456-7890"; "[^0-9]"; "") | Normalize phone to the format 1XXXXXXXXXX | 12124567890 |