Status
Tech review

Style guide




Short description

Replaces the first occurrence of a given substring with the given replacement.

Output

Available since




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


findReplaceFirst(text, stringToBeReplaced, replacement) #Output: Text



Parser expressionDescription


findReplaceFirst("Goodbye my love, hello my friend.", "my", "your")


This example returns "Goodbye your love, hello my friend."



Parameters used in this function

ParameterInput (data type)Description
text

Any given text.
stringToBeReplaced

The string that should be replaced in text.
replacement

The replacement for all found substrings matching the stringToBeReplaced.



This function returns a


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