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

Matrix.SearchAndReplace

Searches and replaces text.

Component Version macOS Windows Linux Server iOS SDK
Matrix 16.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Matrix.SearchAndReplace"; MatrixRef; Search Text; Replace Text { ; firstRow; LastRow; firstCol; lastCol } )   More

Parameters

Parameter Description Example Flags
MatrixRef The matrix reference number. $matrix
Search Text The text to search. "Hello"
Replace Text The text to replace with.
Can include styled text.
"Hallo"
firstRow The index of first row.
Default is 0.
0 Optional
LastRow The index of last row.
Default is Matrix.Height-1.
5 Optional
firstCol The index of first column.
Default is 0.
0 Optional
lastCol The index of last column.
Default is Matrix.Width-1.
6 Optional

Result

Returns OK or error.

Description

Searches and replaces text.

Examples

Search and replace some text:

Let ([
    // split a CSV
    matrix = MBS( "Matrix.CSVSplit"; "FirstName;LastName;City¶Joe;Miller;Las Vegas¶Bob;\"Johnson-Meyer\";\"Köln\"");
    // swap first and second row
    r = MBS("Matrix.SearchAndReplace"; matrix; "ö"; "oe");
    // and ask for text back with column names in first row
    text = MBS("Matrix.CSV"; matrix);
    r = MBS("Matrix.Release"; matrix)
]; text )

See also

Release notes

  • Version 16.2
    • Added Matrix.SearchAndReplace, Matrix.SwapColumns and Matrix.SwapRows functions.

Blog Entries

This function checks for a license.

Created 22nd March 2026, last changed 22nd March 2026


Matrix.Rotate - Matrix.SetColumn