PowerUp Description

The pwrREGEXREPLACE PowerUp function applies the provided regular expression to the value (using a case-sensitive match) and replaces matches with the replacement string value.

PowerUp Syntax

pwrREGEXREPLACE(value, expression, replacement_string)

The pwrREGEXREPLACE PowerUp function has the following arguments:

value – Required. This is the source text to be searched by expression.

expression – Required. This is the regular expression to be used to find a matching pattern of text within value.

replacement_string – Required. This is the value to be inserted into the value string wherever the provided expression matches.

Return Value

pwrREGEXREPLACE will return the resulting text from replacing the matched substrings in value by expression with the replacement_string provided.

Remarks

You can override the case-sensitive matching using the (?i) modifier in your regular expression to make it case-insensitive. Within your regular expression you can enable case-sensitivity by turning off the case-insensitive off using the modifier (?-i).

Example

=pwrREGEXREPLACE(A1, "\blitre\b", "liter")

Leave a Reply

Your email address will not be published. Required fields are marked *