Welcome to Portal
Replaces text that matches the pattern.
REGEXREPLACE(text, regular_expression, replacement)
text - The text, a part of which will be replaced.
regular_expression - The regular expression. All matching instances in text will be replaced.
replacement - The text which will be inserted into the original text. Examples
Formula | Result |
=REGEXREPLACE("Hello 123"; "[0-9]+"; "000") | Hello 000 |
= REGEXREPLACE(A3; "[0-9]*\.[0-9]+[0-9]+"; "15.75")
| Bag weight is 15.75 kgs |
=REGEXREPLACE(A4; "\(([A-Za-z]+)\)"; C4) | Content in brackets |
Get a hands-on experience of the function in the embedded range below.
Errors | Meaning |
#N/A! | The specified delimiter was not found in the given text string. The given instance value is higher than the total occurrences of the delimiter in the text string. |
#NAME! | The function name is incorrect or invalid. The given defined name (if any) is invalid. There is a typo in the defined name used in the function. Double quotes are missing for text values in the function. Colon missing in a cell range reference. |
#VALUE! | The given argument's data type is incorrect or invalid. The given instance value is 0 or higher the length of the text string. |
#REF! | The given cell reference is incorrect or invalid. This error may occur when a cell/range has been deleted, moved, or pasted over. |
Similar Functions
Subscribe to receive notifications from this article.