You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

This function replaces the first occurrence of a given substring with a given replacement.

Syntax
findReplaceFirst(text, stringToBeReplaced, replacement) #Output: Text
Examples
Parser expressionDescription
findReplaceFirst("Goodbye my love, hello my friend.", "my", "your")

This example returns

Goodbye your love, hello my friend.

Additional information

Parameters used in this function

ParameterInput (data type)Description
text

TEXT

Any given text.
stringToBeReplaced

TEXT

The string that should be replaced.
replacement

TEXT

The replacement for all found substrings matching the stringToBeReplaced.
Output

This function returns a TEXT

If you want to use a regular expression instead, have a look at replaceFirst().

If you want to replace all occurences of a substring, have a look at findReplaceAll().