Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Find & Replace all occurrences of a text.

Component Version macOS Windows Linux Server iOS SDK
Text 7.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.ReplaceAll"; Text; Find; ReplaceWithText )   More


Parameter Description Example
Text The text to search. "Hello World"
Find The text to find. "o"
ReplaceWithText The new text. "a"


Returns text or error.


Find & Replace all occurrences of a text.
Quickly looks for all occurrences of a given text in another text and replaces it with a new text.
Optimized code for extra speed if you replace one character with another character.

This function works on pure text, so any text style is lost.


Simple replace:

MBS( "Text.ReplaceAll"; "Hello"; "e"; "a" )

Example result: "Hallo"

Replace emoji:

MBS( "Text.ReplaceAll"; "🍎🍓🍒"; "🍓"; "🍌")

Example result: 🍎🍌🍒

See also

Release notes

Blog Entries

This function checks for a license.

Created 13th July 2017, last changed 31st January 2023

Text.RemovePrefix - Text.ReplaceNewline

💬 Ask a question or report a problem