Replaces one or all instances of a substring with another substring. This function searches string for occurrences of search string, starting at offset. The function replaces the first occurrence with replace string. If replace all? is TRUE, the function replaces all the occurrences. If you want to perform a case-insensitive search or search for more complex patterns, use the Match Pattern function.
![]() |
replace all? determines if the function should replace all occurrences of the search string or only the first occurrence. If FALSE (default), the function replaces only the first occurrence. |
![]() |
string is the input string the function searches. |
![]() |
search string is the string you want to search for and replace. If search string is an empty string, the function replaces the empty strings between each character in string with replace string. |
![]() |
replace string replaces the string in search string. The default is an empty string. |
![]() |
offset determines the number of characters into string at which the function starts searching for search string. |
![]() |
result string contains the string with one or all occurrences of search string replaced with replace string. If replace string is empty, result string contains string with search string deleted. |
![]() |
offset past replacement indicates the offset in result string of the character immediately following where the last match and replacement occurred. |